1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 14:16:32 +02:00

[2.0.1] Implement haphazard error collection for AttrValidator.

- Error collector / Language can take arrays and listify them
- AttrValidator takes token by reference
- Formatted errors now have their severity <strong>
- 100 test-cases! W00t!

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1250 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-06-27 02:03:15 +00:00
parent a005da8a4c
commit 3a1d505b3d
12 changed files with 205 additions and 44 deletions

View File

@@ -45,8 +45,8 @@ class HTMLPurifier_ErrorCollectorTest extends UnitTestCase
$this->assertIdentical($collector->getRaw(), $result);
$formatted_result =
'<ul><li>Warning: Message 2 at line 3</li>'.
'<li>Error: Message 1 at line 23</li></ul>';
'<ul><li><strong>Warning</strong>: Message 2 at line 3</li>'.
'<li><strong>Error</strong>: Message 1 at line 23</li></ul>';
$config = HTMLPurifier_Config::create(array('Core.MaintainLineNumbers' => true));
@@ -91,8 +91,8 @@ class HTMLPurifier_ErrorCollectorTest extends UnitTestCase
$this->assertIdentical($collector->getRaw(), $result);
$formatted_result =
'<ul><li>Error: Message 1</li>'.
'<li>Error: Message 2</li></ul>';
'<ul><li><strong>Error</strong>: Message 1</li>'.
'<li><strong>Error</strong>: Message 2</li></ul>';
$config = HTMLPurifier_Config::createDefault();
$this->assertIdentical($collector->getHTMLFormatted($config), $formatted_result);
}