Finish taking the multiple issues which Discourse had with the very large number of posts in this particular topic
This commit is contained in:
parent
09bf758f42
commit
f9b469b9b6
@ -1056,7 +1056,8 @@ class GossamerForumsImporter < ImportScripts::Base
|
|||||||
# Remove ![http://data:image/, etc. as this is not supported.
|
# Remove ![http://data:image/, etc. as this is not supported.
|
||||||
# sanitized_message.gsub!(/!\[data:image\/[^\]]+\]\([^)]+\)/, '')
|
# sanitized_message.gsub!(/!\[data:image\/[^\]]+\]\([^)]+\)/, '')
|
||||||
# sanitized_message.gsub!(/!\[[^\]]*\]\(https?:\/\/data:image\/[a-zA-Z]+;base64,[^)]+\)/, '')
|
# sanitized_message.gsub!(/!\[[^\]]*\]\(https?:\/\/data:image\/[a-zA-Z]+;base64,[^)]+\)/, '')
|
||||||
sanitized_message.gsub!(/!\[.*?\]\((?:http|https):\/\/data:image\/[^;]+;base64,[^)]+\)/i, '')
|
# sanitized_message.gsub!(/!\[.*?\]\((?:http|https):\/\/data:image\/[^;]+;base64,[^)]+\)/i, '')
|
||||||
|
sanitized_message.gsub!(/!\[(?:http|https):\/\/data:image\/[^]]+\]\((?:http|https):\/\/data:image\/[^)]+\)/, '')
|
||||||
|
|
||||||
# Ensure sentence structure
|
# Ensure sentence structure
|
||||||
unless sanitized_message.match?(/[.!?]\s|[.!?]$/)
|
unless sanitized_message.match?(/[.!?]\s|[.!?]$/)
|
||||||
|
Loading…
Reference in New Issue
Block a user