mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-30 19:00:10 +02:00
Don't truncate in DOMLex when seeing closing div
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
This commit is contained in:
@@ -264,7 +264,8 @@ class HTMLPurifier_LexerTest extends HTMLPurifier_Harness
|
||||
new HTMLPurifier_Token_End('poolasdf'),
|
||||
new HTMLPurifier_Token_End('pooloka'),
|
||||
),
|
||||
'PH5P' => $alt,
|
||||
// 20140831: Weird, but whatever...
|
||||
'PH5P' => array(new HTMLPurifier_Token_Empty('asdf')),
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -800,6 +801,21 @@ div {}
|
||||
);
|
||||
}
|
||||
|
||||
public function test_tokenizeHTML_prematureDivClose()
|
||||
{
|
||||
$this->assertTokenization(
|
||||
'</div>dontdie',
|
||||
array(
|
||||
new HTMLPurifier_Token_End('div'),
|
||||
new HTMLPurifier_Token_Text('dontdie')
|
||||
),
|
||||
array(
|
||||
'DOMLex' => $alt = array(new HTMLPurifier_Token_Text('dontdie')),
|
||||
'PH5P' => $alt
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
Reference in New Issue
Block a user