rails / rails-html-sanitizer

MIT License
302 stars 80 forks source link

tests: handle libxml 2.10.0 incorrectly-opened comment parsing #143

Closed flavorjones closed 2 years ago

flavorjones commented 2 years ago

libxml 2.10.0 just dropped, and it contains a change to how incorrectly-opened HTML comments are parsed. This PR updates the tests to handle this behavior, which returns to the libxml 2.9.13-and-earlier behavior for comments starting with <!.

Related, see:

There was also a related issue opened on this repository:

Note that this behavior will be the default in a future Nokogiri release. This PR makes the tests compatible with all the known libxml2 behaviors.