From f9b469b9b68dbad3b129580be3658d3d9f0988f3 Mon Sep 17 00:00:00 2001 From: saint Date: Sat, 7 Dec 2024 18:00:35 +1100 Subject: [PATCH] Finish taking the multiple issues which Discourse had with the very large number of posts in this particular topic --- goss-restorethread.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/goss-restorethread.rb b/goss-restorethread.rb index 7eb5e99..161168c 100644 --- a/goss-restorethread.rb +++ b/goss-restorethread.rb @@ -1056,7 +1056,8 @@ class GossamerForumsImporter < ImportScripts::Base # Remove ![http://data:image/, etc. as this is not supported. # sanitized_message.gsub!(/!\[data:image\/[^\]]+\]\([^)]+\)/, '') # 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 unless sanitized_message.match?(/[.!?]\s|[.!?]$/)