mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05: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
1 changed files with 3 additions and 1 deletions
|
@ -320,7 +320,9 @@ class ImportScripts::VanillaSQL < ImportScripts::Base
|
||||||
raw.gsub!(/\[attach[^\]]*\]\d+\[\/attach\]/i, "")
|
raw.gsub!(/\[attach[^\]]*\]\d+\[\/attach\]/i, "")
|
||||||
|
|
||||||
# sanitize img tags
|
# 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
|
raw
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue