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:
@@ -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
|
||||
|
Reference in New Issue
Block a user