Skip to content
Snippets Groups Projects
Unverified Commit 82161d8a authored by Mike Dalessio's avatar Mike Dalessio Committed by GitHub
Browse files

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

parent afa2e257
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment