1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-10 01:06:20 +02:00

Add full documentation. Implement deferred ChildDef to HTMLModule. Add missing attributes for table, switched some to Number. Add necessary includes to module files. Add pre exclusions. Printer now ksorts arrays before output. Exclude ins/del from descendants_are_inline flagging.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@717 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-02-04 20:09:35 +00:00
parent 6478c7c2df
commit a863f62489
13 changed files with 258 additions and 25 deletions

View File

@ -1,6 +1,7 @@
<?php
require_once 'HTMLPurifier/HTMLModule.php';
require_once 'HTMLPurifier/AttrTransform/BdoDir.php';
/**
* XHTML 1.1 Bi-directional Text Module, defines elements that
@ -23,13 +24,19 @@ class HTMLPurifier_HTMLModule_Bdo extends HTMLPurifier_HTMLModule
$this->info['bdo']->attr = array(
0 => array('Core'),
'dir' => $dir, // required
// The Abstract Module specification has the attribute
// inclusions wrong for bdo: bdo allows
// xml:lang too (and we'll toss in lang for good measure,
// though it is not allowed for XHTML 1.1, this will
// be managed with a global attribute transform)
'lang' => 'Lang',
'xml:lang' => 'Lang'
);
$this->info['bdo']->content_model = '#PCDATA | Inline';
$this->info['bdo']->content_model_type = 'optional';
$this->info['bdo']->content_model_type = 'optional';
$this->info['bdo']->attr_transform_post[] = new HTMLPurifier_AttrTransform_BdoDir();
// provides fallback behavior if dir's missing (dir is required)
$this->info['bdo']->attr_transform_post[] =
new HTMLPurifier_AttrTransform_BdoDir();
}
}