v0.21 Add support for Gossamer inlined external image URLs in Discourse
This commit is contained in:
parent
0bba1c4638
commit
171159cba2
@ -1,5 +1,5 @@
|
||||
# gossamer threads migration-import code
|
||||
# v0.20
|
||||
# v0.21
|
||||
|
||||
require 'mysql2'
|
||||
require 'open-uri'
|
||||
@ -687,6 +687,9 @@ class GossamerForumsImporter < ImportScripts::Base
|
||||
# Remove unsupported tags
|
||||
sanitized_message.gsub!(/\[.*?\]/, '')
|
||||
|
||||
# Convert inline image syntax from `!(url)` to ``
|
||||
sanitized_message.gsub!(/!\((http[s]?:\/\/[^\)]+)\)/, '')
|
||||
|
||||
sanitized_message
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user