From 6c8dcdb30c5303272fb30e7f2de3d652f090954b Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Thu, 20 Jul 2023 12:01:45 +0200 Subject: [PATCH] DEV: Consistently use html5 loofah (#22711) Turns out making a html4 fragment and then operating on parts of it using html5 fragments is a bad idea. ;) This seems to fix the issue with occasionally missing GH icons in oneboxes. --- plugins/chat/lib/chat/message_processor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/chat/lib/chat/message_processor.rb b/plugins/chat/lib/chat/message_processor.rb index bc9ec2acee8..ae663ecb624 100644 --- a/plugins/chat/lib/chat/message_processor.rb +++ b/plugins/chat/lib/chat/message_processor.rb @@ -12,7 +12,7 @@ module Chat @opts = {} cooked = Chat::Message.cook(chat_message.message, user_id: chat_message.last_editor_id) - @doc = Loofah.fragment(cooked) + @doc = Loofah.html5_fragment(cooked) end def run!