0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-01-23 13:51:54 +00:00
htmlpurifier/library/HTMLPurifier.stub.php

12 lines
336 B
PHP
Raw Normal View History

<?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'));