|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?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]);
- }
- }
-
-
|