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
