mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-08 07:01:53 +00:00
e152bf045d
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
12 lines
336 B
PHP
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'));
|