Release 2.0.1, merged in 1181 to HEAD.
[htmlpurifier.git] / library / HTMLPurifier / HTMLModule / Bdo.php
blob2d9dffb6222c388080bff2799041d88409768ddc
1 <?php
3 require_once 'HTMLPurifier/HTMLModule.php';
4 require_once 'HTMLPurifier/AttrTransform/BdoDir.php';
6 /**
7 * XHTML 1.1 Bi-directional Text Module, defines elements that
8 * declare directionality of content. Text Extension Module.
9 */
10 class HTMLPurifier_HTMLModule_Bdo extends HTMLPurifier_HTMLModule
13 var $name = 'Bdo';
14 var $attr_collections = array(
15 'I18N' => array('dir' => false)
18 function HTMLPurifier_HTMLModule_Bdo() {
19 $bdo =& $this->addElement(
20 'bdo', true, 'Inline', 'Inline', array('Core', 'Lang'),
21 array(
22 'dir' => 'Enum#ltr,rtl', // required
23 // The Abstract Module specification has the attribute
24 // inclusions wrong for bdo: bdo allows Lang
27 $bdo->attr_transform_post['required-dir'] = new HTMLPurifier_AttrTransform_BdoDir();
29 $this->attr_collections['I18N']['dir'] = 'Enum#ltr,rtl';