The libgumbo parser used by Nokogiri::HTML5 is superior, standards-wise, to the libxml2 parser used by Nokogiri::HTML4 (the default).
This PR replaces #239. It has a much more flexible API that provides both html4 and html5 methods. It's up to the caller to choose which they want (note that the generic calls like Loofah.fragment still default to HTML4).
[x] rename generic html methods with a html4 name, and alias the generic method names to them
[x] introduce HTML5 functionality
[x] get JRuby green (!)
[x] ~add a CI job to test against an older version of Nokogiri to ensure backwards-compatibility~
Note that testing in CI with older Rubies is sufficient to test older versions of Nokogiri, because Ruby 2.5 and 2.6 use Nokogiri 1.12 and 1.13, respectively, for precompiled binaries.
The libgumbo parser used by Nokogiri::HTML5 is superior, standards-wise, to the libxml2 parser used by Nokogiri::HTML4 (the default).
This PR replaces #239. It has a much more flexible API that provides both html4 and html5 methods. It's up to the caller to choose which they want (note that the generic calls like
Loofah.fragment
still default to HTML4).html4
name, and alias the generic method names to themNote that testing in CI with older Rubies is sufficient to test older versions of Nokogiri, because Ruby 2.5 and 2.6 use Nokogiri 1.12 and 1.13, respectively, for precompiled binaries.