This class was developed as part of the form library of the CEO framework I'm working on. Useful for the case where you have a textarea in your form and want to allow HTML but make sure it's not broken (especially if you're planning to display it on a page).
Class and test can be found in the repository:
html_validator.class.phpunit.html_validator.phpBased on the script found
here with a couple bells and whistles added.
Labels: php