mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-11 01:36:20 +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:
@ -41,9 +41,15 @@ class HTMLPurifier_HTMLModule_Legacy extends HTMLPurifier_HTMLModule
|
||||
$this->addElement('menu', 'Block', 'Required: li', 'Common', array(
|
||||
'compact' => 'Bool#compact'
|
||||
));
|
||||
$this->addElement('s', 'Inline', 'Inline', 'Common');
|
||||
$this->addElement('strike', 'Inline', 'Inline', 'Common');
|
||||
$this->addElement('u', 'Inline', 'Inline', 'Common');
|
||||
|
||||
$s = $this->addElement('s', 'Inline', 'Inline', 'Common');
|
||||
$s->formatting = true;
|
||||
|
||||
$strike = $this->addElement('strike', 'Inline', 'Inline', 'Common');
|
||||
$strike->formatting = true;
|
||||
|
||||
$u = $this->addElement('u', 'Inline', 'Inline', 'Common');
|
||||
$u->formatting = true;
|
||||
|
||||
// setup modifications to old elements
|
||||
|
||||
|
Reference in New Issue
Block a user