mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-30 19:00:10 +02:00
Properly handle nested sublists by folding into previous list item.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
@@ -35,10 +35,17 @@ class HTMLPurifier_Strategy_FixNestingTest extends HTMLPurifier_StrategyHarness
|
||||
$this->assertResult('<ul></ul>', '');
|
||||
}
|
||||
|
||||
function testRemoveIllegalPCDATA() {
|
||||
function testListHandleIllegalPCDATA() {
|
||||
$this->assertResult(
|
||||
'<ul>Illegal text<li>Legal item</li></ul>',
|
||||
'<ul><li>Legal item</li></ul>'
|
||||
'<ul><li>Illegal text</li><li>Legal item</li></ul>'
|
||||
);
|
||||
}
|
||||
|
||||
function testRemoveIllegalPCDATA() {
|
||||
$this->assertResult(
|
||||
'<table><tr>Illegal text<td></td></tr></table>',
|
||||
'<table><tr><td></td></tr></table>'
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user