Stauros
一个快速的XSS消除PHP库.
IMPORTANT
THIS IS AN EXPERIMENTAL LIBRARY, USE AT YOUR OWN RISKHow to use it
With the default settings, simply callStauros->scanHTML():
$stauros = new Stauros;$clean = $stauros->scanHTML($dirty);
Easy as that
立即学习“PHP免费学习笔记(深入)”;
一个功能强大的B2B与B2C的购物平台,除了原本OSC功能外,增加更新的功能: 一、 取消了register_globals必须开启的限制 二、 將HTML程式碼与PHP程式碼完全分离,採用了smarty 樣板引擎 三、 每支档案includes所需函数与资料库连结,使的网页显示速度明显提升 四、 检视、购买商品群组权限设定 五、 十八岁以下禁购机制 六、 折价券购物抵扣机制 七、 礼券购物机制
Working with streams
Stauros supports streaming content as well. You can use a stream as input, getting a string as output:
$clean = $stauros->scanHTMLStreamToString($stream);
Or you can use it as a stream to stream process:
$stauros->scanHTMLStreamToStream($input, $output);
Advanced Usage
The configuration class (Stauros\HTML\Config) allows you to specify html tag whitelists, as well as attribute whitelist and implement an attribute callback for further customization.
项目主页:http://www.open-open.com/lib/view/home/1441378271175










