1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

Setup ErrorCollector to maintain new error format, and output that HTML.

Also changed:
    - DirectLex keeps track of column numbers in context
    - New class HTMLPurifier_ErrorStruct

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang
2008-09-15 19:08:58 -04:00
parent 3184fee468
commit 6a06b92f0c
8 changed files with 187 additions and 54 deletions

View File

@@ -1,5 +1,8 @@
<?php
/**
* @warning HTML output is in flux, but eventually needs to be stabilized.
*/
class HTMLPurifier_ErrorCollectorTest extends HTMLPurifier_Harness
{
@@ -44,11 +47,13 @@ class HTMLPurifier_ErrorCollectorTest extends HTMLPurifier_Harness
$this->assertIdentical($this->collector->getRaw(), $result);
/*
$formatted_result =
'<ul><li><strong>Warning</strong>: Message 2 at line 3</li>'.
'<li><strong>Error</strong>: Message 1 at line 23</li></ul>';
$this->assertIdentical($this->collector->getHTMLFormatted($this->config), $formatted_result);
*/
}
@@ -75,10 +80,12 @@ class HTMLPurifier_ErrorCollectorTest extends HTMLPurifier_Harness
);
$this->assertIdentical($this->collector->getRaw(), $result);
/*
$formatted_result =
'<ul><li><strong>Error</strong>: Message 1</li>'.
'<li><strong>Error</strong>: Message 2</li></ul>';
$this->assertIdentical($this->collector->getHTMLFormatted($this->config), $formatted_result);
*/
}
function testContextSubstitutions() {