You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be an issue on JRuby with attribute values beginning with something that looks like a protocol (namely, characters, and then a colon). This causes the document to be parsed incorrectly.
I created a small script to test this:
require'nokogiri'test_string=<<-EOF<p>This is a sample document that has been created as an example of a link to a file that is not an .html document.</p><p> <img src="embedded:image1.png" alt="image1.png" /></p>EOFdoc=Nokogiri::HTML::DocumentFragment.parse(test_string)putsdoc.to_s
CRuby:
<p>This is a sample document that has been created as an example of a link to a file that is not an .html document.</p>
<p>
<img src="embedded:image1.png" alt="image1.png"></p>
JRuby:
<p>This is a sample document that has been created as an example of a link to a file that is not an .html document.</p>
<p>
<img image1.png="">
</p>
The text was updated successfully, but these errors were encountered:
I got below on Nokogiri master and JRuby 1.7.0.preview2:
<p>This is a sample document that has been created as an example of a link to a file that is not an .html document.</p>
<p>
<img alt="image1.png" src="embedded:image1.png">
</p>
So, it looks the bug has been fixed by another bug fix.
Nokogiri 1.5.5
JRuby 1.6.7.2
There seems to be an issue on JRuby with attribute values beginning with something that looks like a protocol (namely, characters, and then a colon). This causes the document to be parsed incorrectly.
I created a small script to test this:
CRuby:
JRuby:
The text was updated successfully, but these errors were encountered: