FIX: vanilla_mysql importer removes everything between the first and last img tags in a post

This commit is contained in:
Neil Lalonde 2016-05-25 12:41:32 -04:00
parent 5ec98e7ec5
commit fe42b189c9

View file

@ -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