diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2014-02-21 15:43:14 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2014-02-21 15:43:14 +0100 |
commit | d4949327efa15b492cab1bef3fe074290a328a17 (patch) | |
tree | e89e0322bb1f1b06d663fd10fdded21bac867e5d /inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Bdo.php | |
parent | c9bd17a1007bb78e5de0775efca01df0fb515031 (diff) | |
download | wallabag-d4949327efa15b492cab1bef3fe074290a328a17.tar.gz wallabag-d4949327efa15b492cab1bef3fe074290a328a17.tar.zst wallabag-d4949327efa15b492cab1bef3fe074290a328a17.zip |
[add] HTML Purifier added to clean code
Diffstat (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Bdo.php')
-rw-r--r-- | inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Bdo.php | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Bdo.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Bdo.php new file mode 100644 index 00000000..191a78d1 --- /dev/null +++ b/inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Bdo.php | |||
@@ -0,0 +1,44 @@ | |||
1 | <?php | ||
2 | |||
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 | ||
8 | { | ||
9 | |||
10 | /** | ||
11 | * @type string | ||
12 | */ | ||
13 | public $name = 'Bdo'; | ||
14 | |||
15 | /** | ||
16 | * @type array | ||
17 | */ | ||
18 | public $attr_collections = array( | ||
19 | 'I18N' => array('dir' => false) | ||
20 | ); | ||
21 | |||
22 | /** | ||
23 | * @param HTMLPurifier_Config $config | ||
24 | */ | ||
25 | public function setup($config) | ||
26 | { | ||
27 | $bdo = $this->addElement( | ||
28 | 'bdo', | ||
29 | 'Inline', | ||
30 | 'Inline', | ||
31 | array('Core', 'Lang'), | ||
32 | array( | ||
33 | 'dir' => 'Enum#ltr,rtl', // required | ||
34 | // The Abstract Module specification has the attribute | ||
35 | // inclusions wrong for bdo: bdo allows Lang | ||
36 | ) | ||
37 | ); | ||
38 | $bdo->attr_transform_post[] = new HTMLPurifier_AttrTransform_BdoDir(); | ||
39 | |||
40 | $this->attr_collections['I18N']['dir'] = 'Enum#ltr,rtl'; | ||
41 | } | ||
42 | } | ||
43 | |||
44 | // vim: et sw=4 sts=4 | ||