首頁 > 後端開發 > php教程 > 一个快速的XSS消除PHP库:Stauros

一个快速的XSS消除PHP库:Stauros

WBOY
發布: 2016-06-23 13:27:08
原創
866 人瀏覽過

Stauros

一个快速的XSS消除PHP库.

IMPORTANT

THIS IS AN EXPERIMENTAL LIBRARY, USE AT YOUR OWN RISK

How to use it

With the default settings, simply callStauros->scanHTML():

$stauros = new Stauros;$clean = $stauros->scanHTML($dirty);
登入後複製

Easy as that

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

來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板