Change some instances of Nokogiri HTML4 parsing to HTML5 (#31812)
This commit is contained in:
parent
b716248fc5
commit
10143d053a
8 changed files with 11 additions and 11 deletions
|
@ -16,7 +16,7 @@ class PlainTextFormatter
|
|||
if local?
|
||||
text
|
||||
else
|
||||
node = Nokogiri::HTML.fragment(insert_newlines)
|
||||
node = Nokogiri::HTML5.fragment(insert_newlines)
|
||||
# Elements that are entirely removed with our Sanitize config
|
||||
node.xpath('.//iframe|.//math|.//noembed|.//noframes|.//noscript|.//plaintext|.//script|.//style|.//svg|.//xmp').remove
|
||||
node.text.chomp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue