1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- class HTMLPurifier_HTMLModule_Edit extends HTMLPurifier_HTMLModule
- {
-
- public $name = 'Edit';
-
- public function setup($config)
- {
- $contents = 'Chameleon: #PCDATA | Inline ! #PCDATA | Flow';
- $attr = array(
- 'cite' => 'URI',
-
- );
- $this->addElement('del', 'Inline', $contents, 'Common', $attr);
- $this->addElement('ins', 'Inline', $contents, 'Common', $attr);
- }
-
-
-
-
-
-
- public $defines_child_def = true;
-
- public function getChildDef($def)
- {
- if ($def->content_model_type != 'chameleon') {
- return false;
- }
- $value = explode('!', $def->content_model);
- return new HTMLPurifier_ChildDef_Chameleon($value[0], $value[1]);
- }
- }
|