3 ms·
YUI editor seconded - but we have extended it a bit to use my XHTMLPurifier (http://github.com/biilmann/javascript-xhtml-purifier http://github.com/biilmann/jav
by bobfunk 18y ago
YUI editor seconded - but we have extended it a bit to use my XHTMLPurifier (http://github.com/biilmann/javascript-xhtml-purifier http://github.com/biilmann/javascript-xhtml-purifier) to clean up the HTML.
It's based on a partial implementation of the algorithm for parsing HTML specified in the HTML 5 draft - so it handles even really scary HTML from Word pasting, and spits of clean pretty printed and validating xhtml.
For our use we do put some pretty strict level on what markup people can include, though, so it might not serve for everybody.