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
|
@ -5,7 +5,7 @@ module Admin::Trends::StatusesHelper
|
|||
text = if status.local?
|
||||
status.text.split("\n").first
|
||||
else
|
||||
Nokogiri::HTML(status.text).css('html > body > *').first&.text
|
||||
Nokogiri::HTML5(status.text).css('html > body > *').first&.text
|
||||
end
|
||||
|
||||
return '' if text.blank?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue