soosyze/kses (packagist): An HTML/XHTML filter written in PHP. Checks on attribute values. Can be used to avoid Cross-Site Scripting (XSS), Buffer Overflows and Denial of Service attacks, among other things.
Keywords: php|security|filter|xss|web-security|kses|xss-attacks|dompurify|cross-site-scripting|prevent-xss-attacks