Increase test coverage, and modify handleEnd behavior to only see correct tokens.
commit70515dd48f2299c0f623df69e92f2d54688e7f12
authorEdward Z. Yang <edwardzyang@thewritingpot.com>
Wed, 1 Oct 2008 19:40:31 +0000 (1 15:40 -0400)
committerEdward Z. Yang <edwardzyang@thewritingpot.com>
Wed, 1 Oct 2008 19:40:31 +0000 (1 15:40 -0400)
tree5ef763b90a953b9aa17e2869628ed83f020fff71
parent1555cb617f1d045755bd300dc3d958505059c00c
Increase test coverage, and modify handleEnd behavior to only see correct tokens.

Previously, handleEnd was called for any end tag, except ones that were obviously
spurious because there were no parent tags. Now, it is only called for end tags
that are "approved." If an injector operates on the end tag, we automatically
punt. There may be some optimizations that could be made to this procedure,
but for now it's much more consistent.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
library/HTMLPurifier/Strategy/MakeWellFormed.php
tests/HTMLPurifier/Strategy/MakeWellFormed/EndInsertInjector.php [new file with mode: 0644]
tests/HTMLPurifier/Strategy/MakeWellFormed/EndInsertInjectorTest.php [new file with mode: 0644]
tests/HTMLPurifier/Strategy/MakeWellFormed/EndRewindInjector.php [new file with mode: 0644]
tests/HTMLPurifier/Strategy/MakeWellFormed/EndRewindInjectorTest.php [new file with mode: 0644]
tests/HTMLPurifier/Strategy/MakeWellFormed/SkipInjector.php [new file with mode: 0644]
tests/HTMLPurifier/Strategy/MakeWellFormed/SkipInjectorTest.php [new file with mode: 0644]
tests/HTMLPurifier/Strategy/MakeWellFormed_InjectorTest.php