Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nokogiri includes <head> content in <body> after <ins> tag jruby, 1.6.7.2 #1464

Closed
toddgardner opened this issue May 4, 2016 · 2 comments
Closed

Comments

@toddgardner
Copy link

toddgardner commented May 4, 2016

jruby:

jruby-9.0.4.0 :026 > Nokogiri::HTML::Document.parse("<html><head><ins></ins><title>Foo</title></head><body><p>Bar</p></body></html>").css('body').to_s
 => "<body><ins></ins><title>Foo</title><p>Bar</p></body>" 

Note both the ins and the title are in the body, even though they are in the head in the doc.

Here's the MRI 2.1.5, 1.6.6.2:

2.1.5 :004 > Nokogiri::HTML::Document.parse("<html><head><ins></ins><title>Foo</title></head><body><p>Bar</p></body></html>").css('body').to_s
 => "<body><p>Bar</p></body>"
@flavorjones
Copy link
Member

This is likely due to the underlying parsing library's behavior, and not Nokogiri's. I'll leave it open in case someone wants to investigate.

@flavorjones
Copy link
Member

I'm going to close this, as there's nothing Nokogiri can do (at least, nothing easy) to modify NekoHTML's behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants