1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-10 17:26:25 +02:00

Implement Edit module.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@712 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-02-04 14:56:55 +00:00
parent d0018a2696
commit cfe50ff8ae
2 changed files with 37 additions and 4 deletions

View File

@ -0,0 +1,30 @@
<?php
require_once 'HTMLPurifier/HTMLModule.php';
/**
* XHTML 1.1 Edit Module, defines editing-related elements. Text Extension Module.
*/
class HTMLPurifier_HTMLModule_Edit extends HTMLPurifier_HTMLModule
{
var $elements = array('del', 'ins');
var $info = array();
var $content_sets = array('Inline' => 'del | ins');
function HTMLPurifier_HTMLModule_Edit() {
foreach ($this->elements as $element) {
$this->info[$element] = new HTMLPurifier_ElementDef();
$this->info[$element]->attr = array(
0 => array('Common'),
'cite' => 'URI',
// 'datetime' => 'Datetime' // Datetime not implemented
);
$this->info[$element]->content_model = '#PCDATA | Inline ! #PCDATA | Flow';
$this->info[$element]->content_model_type = 'chameleon';
}
}
}
?>