HTML filtering library for PHP
HTML Purifier is a comprehensive, customisable php library for filtering user-input or WYSIWYG editor html, returning valid HTML safe from xss attacks.
It has plugins for many PHP frameworks and CMS such as cakephp, symfony, joomla, drupal, etc.
It could be installed using composer using the following command:
composer require ezyang/htmlpurifier