1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 03:10:09 +02:00

Handle <ol><ol> properly by adding missing <li> tag.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
Edward Z. Yang
2010-03-10 00:58:37 -05:00
parent 4d612d5a77
commit 70a7a3f5dd
5 changed files with 46 additions and 2 deletions

View File

@@ -116,6 +116,27 @@ class HTMLPurifier_Strategy_MakeWellFormedTest extends HTMLPurifier_StrategyHarn
);
}
function testNestedOl() {
$this->assertResult(
'<ol><ol></ol></ol>',
'<ol><li><ol></ol></li></ol>'
);
}
function testNestedUl() {
$this->assertResult(
'<ul><ul></ul></ul>',
'<ul><li><ul></ul></li></ul>'
);
}
function testNestedOlWithStrangeEnding() {
$this->assertResult(
'<ol><li><ol><ol><li>foo</li></ol></li><li>foo</li></ol>',
'<ol><li><ol><li><ol><li>foo</li></ol></li><li>foo</li></ol></li></ol>'
);
}
}
// vim: et sw=4 sts=4