-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
[bug] Inconsistent behavior on JRuby/CRuby #2355
Comments
The JRuby code for SaveContextVisitor is brittle and clearly buggy (since this bug exists for fragment nodes but not fragments or document nodes?), but this seems like an easy fix. Fixes #2355
Thanks for reporting this, and sorry you ran into this problem. The JRuby code for serialization is pretty old, apparently buggy, relatively unmaintained, and not well tested. I also don't have a ton of time or interest in keeping the JRuby implementation going. That said, this seems like an easy fix and #2356 is a PR that should address it. |
I'm reading gollum/gollum#1779 and now I'm confused as to what could possibly have introduced this bug in Nokogiri since this code hasn't really been touched in a long time. I'll keep digging. |
A
I think #2356 is the right fix here, to make JRuby's XHTML serialization follow the spec when NO_EMPTY_TAGS is not set. |
thanks for the quick explanation and fix @flavorjones! |
The following snippet produces different results on JRuby and CRuby:
On CRuby, it produces what one would expect:
However, on JRuby, it producs the following invalid XHTML:
Environment
CRuby:
JRuby:
Additional context
This bug was not present on version
1.11.7
The text was updated successfully, but these errors were encountered: