mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 19:30:21 +02:00
Implement "carryover" functionality, requested by Kinderlehrer <bitweaver@7doves.com>
This commit is a limited implementation of the "active formatting elements" algorithm implemented in HTML5, which preserves certain formatting elements such as <a> and <b> when exiting or entering nodes. Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@@ -22,7 +22,7 @@ class HTMLPurifier_Strategy_MakeWellFormed_EndInsertInjectorTest extends HTMLPur
|
||||
$this->assertResult('<i><i>Foo', '<i><i>Foo<b>Comment</b></i><b>Comment</b></i>');
|
||||
}
|
||||
function testEndOfNodeProcessing() {
|
||||
$this->assertResult('<div><i>Foo</div>', '<div><i>Foo<b>Comment</b></i></div>');
|
||||
$this->assertResult('<div><i>Foo</div>asdf', '<div><i>Foo<b>Comment</b></i></div><i>asdf<b>Comment</b></i>');
|
||||
}
|
||||
function testEmptyToStartEndProcessing() {
|
||||
$this->assertResult('<i />', '<i><b>Comment</b></i>');
|
||||
|
Reference in New Issue
Block a user