From 3a1d505b3dd639d453b7e8a5c4dd876d870609cf Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Wed, 27 Jun 2007 02:03:15 +0000 Subject: [PATCH] [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 - 100 test-cases! W00t! git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1250 48356398-32a2-884e-a903-53898d9a118a --- NEWS | 4 +- art/100cases.png | Bin 0 -> 2732 bytes library/HTMLPurifier/AttrValidator.php | 65 +++++++++++++----- library/HTMLPurifier/ErrorCollector.php | 7 +- library/HTMLPurifier/Language.php | 62 +++++++++++++---- library/HTMLPurifier/Language/messages/en.php | 12 +++- .../Strategy/RemoveForeignElements.php | 2 +- .../Strategy/ValidateAttributes.php | 6 +- .../HTMLPurifier/AttrValidator_ErrorsTest.php | 50 ++++++++++++++ tests/HTMLPurifier/ErrorCollectorTest.php | 8 +-- tests/HTMLPurifier/LanguageTest.php | 32 ++++++++- tests/test_files.php | 1 + 12 files changed, 205 insertions(+), 44 deletions(-) create mode 100644 art/100cases.png create mode 100644 tests/HTMLPurifier/AttrValidator_ErrorsTest.php diff --git a/NEWS b/NEWS index c7788e04..7d89e7dc 100644 --- a/NEWS +++ b/NEWS @@ -18,8 +18,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier ! Newlines normalized internally, and then converted back to the value of PHP_EOL. If this is not desired, set your newline format using %Output.Newline. -! Beta error collection, messages are implemented for Lexer and - RemoveForeignElements +! Beta error collection, messages are implemented for the most generic + cases involving Lexing or Strategies - Clean up special case code for