Open klonos opened 1 year ago
Marking this as a contrib candidate, however this is one of those "internal" things that people won't know exist. Besides, it seems to me that kses is really outdated and unmaintained, so that's another thing to consider.
Perhaps we can keep both libraries in core, and add a switch in settings.php. Then those of us that are willing to test the new implementation based on the HTML Purifier library could flip the switch for some sites. Perhaps it can be implemented as a new filter, alternative to the existing. That + telemetry should help us see if this works well/better and no issues reported.
The https://www.drupal.org/project/htmlpurifier contrib module does that:
The comparison page that is linked form that project's page has the following (consolidated):
That table should say it all, but I'll add a few more features: UTF-8 aware | Yes | ??? Object-Oriented | Yes | ??? Validates CSS | Yes | ??? Tables | Yes | ??? PHP 5 only | Yes | ??? E_STRICT compliant | Yes | ??? Can auto-paragraph | Yes | ??? Extensible | Yes | ??? Unit tested | Yes | ???