0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-23 00:41:52 +00:00
htmlpurifier/tests/HTMLPurifier/Strategy
Edward Z. Yang fa413e96ac Implement Injector->handleEnd, with lots of refactoring for injector.
Previous design of injector streaming involved editability only to start, empty
and text tokens, because they could be safely modified without causing formedness
errors.  By modifying notifyEnd to operate before MakeWellFormed's safeguards
kick into effect, it can be converted into a handle function, allowing for
arbitrary modification of end tags.

This change involved quite a bit of restructuring of the MakeWellFormed code,
including the moving of end of document tags to inside the loop, so rewinding
on those tags would be functional, increased reuse of the end tag codepath by
code that inserts end tags (as they could be changed out from under you), and
processToken modified to have an extra parameter to force re-processing of
a token if the original token was an end token.

We're not exactly sure if handleEnd works at this point, but the important
talking point about this refactoring is that nothing else broke. Also, a number
of convenience functions were moved from AutoParagraph to the Injector
supertype (specifically: forward, forwardToEndToken, backward, and current).

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
2008-10-01 00:54:51 -04:00
..
CompositeTest.php - Removed tally(), swallowErrors(), assertNoErrors() 2008-04-14 03:06:36 +00:00
CoreTest.php Remove includes from unit tests. 2008-02-18 04:41:42 +00:00
ErrorsHarness.php Classname() constructors to __construct() constructors, as per SimpleTest. Also normalized ppp declarations; no public declaration for test methods, public/protected for the rest 2008-04-21 15:24:18 +00:00
FixNesting_ErrorsTest.php Classname() constructors to __construct() constructors, as per SimpleTest. Also normalized ppp declarations; no public declaration for test methods, public/protected for the rest 2008-04-21 15:24:18 +00:00
FixNestingTest.php Various fixes: 2008-04-15 03:33:09 +00:00
MakeWellFormed_ErrorsTest.php Track column numbers in addition to line numbers. 2008-09-01 14:10:10 -04:00
MakeWellFormed_InjectorTest.php Implement Injector->handleEnd, with lots of refactoring for injector. 2008-10-01 00:54:51 -04:00
MakeWellFormedTest.php Fix bug involving autoclose and inline elements in strict <blockquote>. 2008-08-01 20:52:06 -04:00
RemoveForeignElements_ErrorsTest.php [3.1.2] Implement comments when %HTML.Trusted is on. 2008-06-25 23:12:19 -04:00
RemoveForeignElements_TidyTest.php Handle CRLF discrepancies 2008-06-24 21:10:51 -04:00
RemoveForeignElementsTest.php [3.1.2] Implement comments when %HTML.Trusted is on. 2008-06-25 23:12:19 -04:00
ValidateAttributes_IDTest.php Handle CRLF discrepancies 2008-06-24 21:10:51 -04:00
ValidateAttributes_TidyTest.php Handle CRLF discrepancies 2008-06-24 21:10:51 -04:00
ValidateAttributesTest.php [3.1.1] Round up imagecrash support with HTML.MaxImgLength 2008-05-23 02:09:43 +00:00