Skip to content
Discussion options

You must be logged in to vote

I think you're right about this. Looking at the standard, it seems < and > should always be turned into &lt; and &gt;. That doesn't match my recollection of the standard. I recall that only being true outside of attributes. And indeed, the Nokogiri code matches my recollection.

    } else if (!attr && ch == '<') {
      replacement = "&lt;";
    } else if (!attr && ch == '>') {
      replacement = "&gt;";
    } else {

It looks like this change was introduced last week. It should be easy enough to change Nokogiri's behavior here.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by tohosaku
Comment options

You must be logged in to vote
2 replies
@flavorjones
Comment options

@flavorjones
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants