1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

Fix some more attribute parsing things that could lead to infinite loops.

git-svn-id: http://htmlpurifier.org/svnroot/html_purifier/trunk@25 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-04-16 00:23:35 +00:00
parent 92bfaafd20
commit 6372a16926
2 changed files with 23 additions and 0 deletions

View File

@@ -112,6 +112,12 @@ class TestCase_HTML_Lexer extends UnitTestCase
// however, we may want to change both styles
// into parsed: '<b>'. SAX has an option for this
// [INVALID]
$input[10] = '<a "=>';
$expect[10] = array(
new MF_StartTag('a', array('"' => ''))
);
foreach($input as $i => $discard) {
$result = $this->HTML_Lexer->tokenizeHTML($input[$i]);
$this->assertEqual($expect[$i], $result);
@@ -155,6 +161,9 @@ class TestCase_HTML_Lexer extends UnitTestCase
$input[] = 'missile=launch';
$expect[] = array('missile' => 'launch');
$input[] = 'href="foo';
$expect[] = array('href' => 'foo');
$size = count($input);
for($i = 0; $i < $size; $i++) {
$result = $this->HTML_Lexer->tokenizeAttributeString($input[$i]);