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:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user