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.
This commit is contained in:
Jarek Radosz 2023-07-20 12:01:45 +02:00 committed by GitHub
parent 88dc6afe64
commit 6c8dcdb30c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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!