HTMLPurifier 4.4.0
/home/ezyang/Dev/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php
Go to the documentation of this file.
00001 <?php
00002 
00007 class HTMLPurifier_HTMLModule_Bdo extends HTMLPurifier_HTMLModule
00008 {
00009 
00010     public $name = 'Bdo';
00011     public $attr_collections = array(
00012         'I18N' => array('dir' => false)
00013     );
00014 
00015     public function setup($config) {
00016         $bdo = $this->addElement(
00017             'bdo', 'Inline', 'Inline', array('Core', 'Lang'),
00018             array(
00019                 'dir' => 'Enum#ltr,rtl', // required
00020                 // The Abstract Module specification has the attribute
00021                 // inclusions wrong for bdo: bdo allows Lang
00022             )
00023         );
00024         $bdo->attr_transform_post['required-dir'] = new HTMLPurifier_AttrTransform_BdoDir();
00025 
00026         $this->attr_collections['I18N']['dir'] = 'Enum#ltr,rtl';
00027     }
00028 
00029 }
00030 
00031 // vim: et sw=4 sts=4