Fix problem where stacked AttrTransforms clobber each other.
[htmlpurifier.git] / library / HTMLPurifier / HTMLModule / Bdo.php
blob23ac3da3a27c056134d17963a66dd06a9bfa3832
1 <?php
3 /**
4 * XHTML 1.1 Bi-directional Text Module, defines elements that
5 * declare directionality of content. Text Extension Module.
6 */
7 class HTMLPurifier_HTMLModule_Bdo extends HTMLPurifier_HTMLModule
10 public $name = 'Bdo';
11 public $attr_collections = array(
12 'I18N' => array('dir' => false)
15 public function setup($config) {
16 $bdo = $this->addElement(
17 'bdo', 'Inline', 'Inline', array('Core', 'Lang'),
18 array(
19 'dir' => 'Enum#ltr,rtl', // required
20 // The Abstract Module specification has the attribute
21 // inclusions wrong for bdo: bdo allows Lang
24 $bdo->attr_transform_post[] = new HTMLPurifier_AttrTransform_BdoDir();
26 $this->attr_collections['I18N']['dir'] = 'Enum#ltr,rtl';
31 // vim: et sw=4 sts=4