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

to_xhtml doesn't print the last slash for self-closing tags in JRuby #834

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

Comments

@bhollis
Copy link

bhollis commented Jan 16, 2013

require 'nokogiri'
x = Nokogiri::XML("<foo><br/></foo>")
puts x.to_xhtml

In JRuby 1.7.2:

<foo>
  <br>

</foo>

In MRI:

<foo>
  <br />
</foo>

Unfortunately this means it produces invalid XHTML.

@bhollis
Copy link
Author

bhollis commented Jan 18, 2013

Here's another example:

require 'nokogiri'
x = Nokogiri::XML("<img src=\"http://jigsaw.w3.org/css-validator/images/vcss\" />")
puts x.to_xhtml

In JRuby:

<img src="http://jigsaw.w3.org/css-validator/images/vcss">

In MRI:

<img src="http://jigsaw.w3.org/css-validator/images/vcss" />

@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