File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -211,17 +211,18 @@ def imageProcessing
211211 end
212212 end
213213 end
214+
214215 checkHTMLtag = self . prompts [ 0 ] . question . scan ( /(\< img .*?src=(.*? ).*?>)/ )
215216 if checkHTMLtag . length ( ) >0
216217 checkHTMLtag . each do |block |
217- enterName = File . basename ( block [ 1 ] ) . strip
218- if !ownerships . find_by ( filename : enterName ) . nil?
218+ enterName = File . basename ( block [ 1 ] ) . strip . gsub ( " \" " , "" )
219+ if !ownerships . find_by ( filename : enterName ) . nil?
219220 uniqueFile = ResourceFile . where ( id : ownerships . find_by ( filename : enterName ) . resource_file_id ) [ 0 ] . filename
220221 uniqueFilename = uniqueFile . model . token +uniqueFile . file . file . match ( /\. \w */ ) [ 0 ]
221222 fb = block [ 0 ] . gsub ( "#{ enterName } " , "/uploads/resource_file/#{ uniqueFilename } " )
222223 self . prompts [ 0 ] . question = self . prompts [ 0 ] . question . gsub ( "#{ block [ 0 ] } " , "#{ fb } " )
223224 else
224- self . prompts [ 0 ] . question = self . prompts [ 0 ] . question . gsub ( "#{ block [ 0 ] } " , "(Image **src=#{ enterName } ** does not exist!)" )
225+ self . prompts [ 0 ] . question = self . prompts [ 0 ] . question . gsub ( "#{ block [ 0 ] } " , "(**src=#{ enterName } ** Image does not exist!)" )
225226 end
226227 end
227228 end
You can’t perform that action at this time.
0 commit comments