0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-01-21 21:11:51 +00:00

Ini is not supported by HipHop.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
Edward Z. Yang 2010-03-09 02:08:29 -05:00
parent 4f8004f5d3
commit e152bf045d

View File

@ -3,6 +3,9 @@
require_once 'HTMLPurifier.includes.php';
$config = HTMLPurifier_Config::createDefault();
if (isset($argv[1])) $config->loadIni($argv[1]);
$config->set('Core.LexerImpl', 'DirectLex');
for ($i = 1, $c = count($argv); $i < $c; $i += 2) {
$config->set($argv[$i], $argv[$i+1]);
}
$purifier = new HTMLPurifier($config);
echo $purifier->purify(file_get_contents('php://stdin'));