2006-07-22 22:48:07 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
set_include_path(get_include_path() . PATH_SEPARATOR . '../library/');
|
|
|
|
|
2006-09-24 18:17:05 +00:00
|
|
|
require_once 'HTMLPurifier/ConfigSchema.php';
|
2006-08-15 21:19:45 +00:00
|
|
|
require_once 'HTMLPurifier/Config.php';
|
2006-07-22 22:48:07 +00:00
|
|
|
require_once 'HTMLPurifier/Lexer/DirectLex.php';
|
2007-02-13 20:51:47 +00:00
|
|
|
require_once 'HTMLPurifier/Context.php';
|
2006-07-22 22:48:07 +00:00
|
|
|
|
|
|
|
$input = file_get_contents('samples/Lexer/4.html');
|
|
|
|
$lexer = new HTMLPurifier_Lexer_DirectLex();
|
2007-02-13 20:51:47 +00:00
|
|
|
$config = HTMLPurifier_Config::createDefault();
|
|
|
|
$context = new HTMLPurifier_Context();
|
2006-07-22 22:48:07 +00:00
|
|
|
|
|
|
|
for ($i = 0; $i < 10; $i++) {
|
2007-02-13 20:51:47 +00:00
|
|
|
$tokens = $lexer->tokenizeHTML($input, $config, $context);
|
2006-07-22 22:48:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|