mirror of
https://github.com/discourse/discourse.git
synced 2025-04-17 06:33:44 +08:00
FIX: vanilla_mysql importer removes everything between the first and last img tags in a post
This commit is contained in:
parent
5ec98e7ec5
commit
fe42b189c9
@ -320,7 +320,9 @@ class ImportScripts::VanillaSQL < ImportScripts::Base
|
||||
raw.gsub!(/\[attach[^\]]*\]\d+\[\/attach\]/i, "")
|
||||
|
||||
# sanitize img tags
|
||||
raw.gsub!(/\<img.*src\="([^\"]+)\".*\>/i) {"\n<img src='#{$1}'>\n"}
|
||||
# This regexp removes everything between the first and last img tag. The .* is too much.
|
||||
# If it's needed, it needs to be fixed.
|
||||
# raw.gsub!(/\<img.*src\="([^\"]+)\".*\>/i) {"\n<img src='#{$1}'>\n"}
|
||||
|
||||
raw
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user