4 * XHTML 1.1 Bi-directional Text Module, defines elements that
5 * declare directionality of content. Text Extension Module.
7 class HTMLPurifier_HTMLModule_Bdo extends HTMLPurifier_HTMLModule
18 public $attr_collections = array(
19 'I18N' => array('dir' => false)
23 * @param HTMLPurifier_Config $config
25 public function setup($config)
27 $bdo = $this->addElement(
31 array('Core', 'Lang'),
33 'dir' => 'Enum#ltr,rtl', // required
34 // The Abstract Module specification has the attribute
35 // inclusions wrong for bdo: bdo allows Lang
38 $bdo->attr_transform_post[] = new HTMLPurifier_AttrTransform_BdoDir();
40 $this->attr_collections['I18N']['dir'] = 'Enum#ltr,rtl';