1. Go to this page and download the library: Download soosyze/kses library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
oosyze\Kses\Xss;
use Soosyze\Kses\AllowedList;
$xss = new Xss();
/**
* Similar to :
* $xss = new Xss(AllowedList::getTags(), AllowedList::getProtocols());
*/
$xss->filter('<SCRIPT SRC=http://xss.rocks/xss.js></SCRIPT>');
// Result : ''
$xss->filter('<IMG SRC="javascript:alert(\'XSS\');">');
// Result : '<IMG src="alert(\'XSS\');">'
$xss->filter('\<a onmouseover=alert(document.cookie)\>xxs link\</a\>');
// Result : '\<a>xxs link\</a>'