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

Style tag should not html encode entities in JRuby #1316

Closed

Conversation

tbeauvais
Copy link
Contributor

This is a fix for: #1315

If you run the following code in JRuby it will result in the > in the style element being HTML entity encoded >, this does not occur with MRI.

html = '<!DOCTYPE html><html><head><style>tr > div { display:block; }</style></head><body><h1>Mr. Belvedere Fan > Club</h1></body></html>'
html_doc = Nokogiri::HTML(html)
puts html_doc.to_html
<!DOCTYPE html >
<html><head><style>tr &gt; div { display:block; }</style></head><body><h1>Mr. Belvedere Fan &gt; Club</h1></body></html>

With this fix the style matches MRI

<!DOCTYPE html >
<html><head><style>tr > div { display:block; }</style></head><body><h1>Mr. Belvedere Fan &gt; Club</h1></body></html>

@flavorjones
Copy link
Member

Thanks for submitting this! I'll take a look once I've cut 1.6.7.

@flavorjones flavorjones self-assigned this Aug 31, 2015
@flavorjones flavorjones added this to the 1.6.8 milestone Feb 17, 2016
@flavorjones
Copy link
Member

Merged! Thank you so much (and thank you for your patience!). Will be in 1.6.8 final.

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

Successfully merging this pull request may close these issues.

None yet

2 participants