0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-01-08 07:01:53 +00:00
htmlpurifier/library/HTMLPurifier.stub.php
Edward Z. Yang e152bf045d Ini is not supported by HipHop.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
2010-03-09 02:08:29 -05:00

12 lines
336 B
PHP

<?php
require_once 'HTMLPurifier.includes.php';
$config = HTMLPurifier_Config::createDefault();
$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'));