Change some instances of Nokogiri HTML4 parsing to HTML5 (#31812)

This commit is contained in:
Mike Dalessio 2024-09-08 14:41:37 -04:00 committed by GitHub
parent b716248fc5
commit 10143d053a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 11 additions and 11 deletions

View file

@ -100,7 +100,7 @@ class TranslateStatusService < BaseService
end
def unwrap_emoji_shortcodes(html)
fragment = Nokogiri::HTML.fragment(html)
fragment = Nokogiri::HTML5.fragment(html)
fragment.css('span[translate="no"]').each do |element|
element.remove_attribute('translate')
element.replace(element.children) if element.attributes.empty?