0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-01-03 05:11:52 +00:00

Update printTokens() debug function to work with new Generator API.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang 2008-06-27 01:33:20 -04:00
parent 636e2883df
commit a5ceb1e22a

View File

@ -171,7 +171,7 @@ function htmlpurifier_add_test($test, $test_file, $only_phpt = false) {
*/
function printTokens($tokens, $index = null) {
$string = '<pre>';
$generator = new HTMLPurifier_Generator();
$generator = new HTMLPurifier_Generator(HTMLPurifier_Config::createDefault(), new HTMLPurifier_Context);
foreach ($tokens as $i => $token) {
if ($index === $i) $string .= '[<strong>';
$string .= "<sup>$i</sup>";