mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-30 19:00:10 +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:
@@ -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]);
|
||||
|
Reference in New Issue
Block a user