From ecce7d4a35df9de7073ef85f096b129937ac6249 Mon Sep 17 00:00:00 2001 From: saint Date: Mon, 9 Dec 2024 17:59:18 +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 | 1 + 1 file changed, 1 insertion(+) diff --git a/goss-restorethread.rb b/goss-restorethread.rb index 60de806..33854d4 100644 --- a/goss-restorethread.rb +++ b/goss-restorethread.rb @@ -1058,6 +1058,7 @@ class GossamerForumsImporter < ImportScripts::Base # 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\/[^]]+\]\((?:http|https):\/\/data:image\/[^)]+\)/, '') + sanitized_message.gsub!(/!\[(https?:\/\/data:image\/[^]]+)\]\((https?:\/\/data:image\/[^)]+)\)/, '') # Ensure sentence structure unless sanitized_message.match?(/[.!?]\s|[.!?]$/)