Change Account::Field parsing to use HTML5::DocumentFragment (#31813)

pull/31816/head
Mike Dalessio 4 months ago committed by GitHub
parent afa2e257e4
commit 82161d8ae5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -73,10 +73,10 @@ class Account::Field < ActiveModelSerializers::Model
end
def extract_url_from_html
doc = Nokogiri::HTML(value).at_xpath('//body')
doc = Nokogiri::HTML5.fragment(value)
return if doc.nil?
return if doc.children.size > 1
return if doc.children.size != 1
element = doc.children.first

Loading…
Cancel
Save