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

Adding an EntityReference after a Text node mangles the entity in JRuby #835

Closed
bhollis opened this issue Jan 16, 2013 · 2 comments
Closed

Comments

@bhollis
Copy link

bhollis commented Jan 16, 2013

Repro:

require 'nokogiri'

d = Nokogiri::XML::Document.new
root = Nokogiri::XML::Element.new('bar', d)
txt = Nokogiri::XML::Text.new('foo', d)
ent = Nokogiri::XML::EntityReference.new(d, '#8217')
root << text
root << ent
d << root
puts d.to_html

In JRuby 1.7.2:

<bar>foo#8217</bar>

In MRI 1.9.3:

<bar>foo&#8217;</bar>

Looks like for whatever reason the entity gets concatenated without & and ;.

@bhollis
Copy link
Author

bhollis commented Jan 16, 2013

I'm not sure how, but perhaps this has to do with 0d8c3f2?

@bhollis
Copy link
Author

bhollis commented Jan 21, 2013

Thanks!

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