diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2014-02-21 15:57:10 +0100 |
---|---|---|
committer | Nicolas Lœuillet <nicolas@loeuillet.org> | 2014-02-21 15:57:10 +0100 |
commit | 99679d06884120c57f43b44e55e03595f1f87bed (patch) | |
tree | a3f2a1aa1afdaeca1386d0c6e8a75344fd2241fb /inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/Strict.php | |
parent | 655214ab30ee84884dc408488b85586f36263fcb (diff) | |
parent | d3b47e94705e17b3ba3529cbb1dc6efe69c5d2b7 (diff) | |
download | wallabag-1.5.2.tar.gz wallabag-1.5.2.tar.zst wallabag-1.5.2.zip |
Merge pull request #481 from wallabag/dev1.5.2
1.5.2
Diffstat (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/Strict.php')
-rw-r--r-- | inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/Strict.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/Strict.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/Strict.php new file mode 100644 index 00000000..ba3260e6 --- /dev/null +++ b/inc/3rdparty/htmlpurifier/HTMLPurifier/HTMLModule/Tidy/Strict.php | |||
@@ -0,0 +1,43 @@ | |||
1 | <?php | ||
2 | |||
3 | class HTMLPurifier_HTMLModule_Tidy_Strict extends HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 | ||
4 | { | ||
5 | /** | ||
6 | * @type string | ||
7 | */ | ||
8 | public $name = 'Tidy_Strict'; | ||
9 | |||
10 | /** | ||
11 | * @type string | ||
12 | */ | ||
13 | public $defaultLevel = 'light'; | ||
14 | |||
15 | /** | ||
16 | * @return array | ||
17 | */ | ||
18 | public function makeFixes() | ||
19 | { | ||
20 | $r = parent::makeFixes(); | ||
21 | $r['blockquote#content_model_type'] = 'strictblockquote'; | ||
22 | return $r; | ||
23 | } | ||
24 | |||
25 | /** | ||
26 | * @type bool | ||
27 | */ | ||
28 | public $defines_child_def = true; | ||
29 | |||
30 | /** | ||
31 | * @param HTMLPurifier_ElementDef $def | ||
32 | * @return HTMLPurifier_ChildDef_StrictBlockquote | ||
33 | */ | ||
34 | public function getChildDef($def) | ||
35 | { | ||
36 | if ($def->content_model_type != 'strictblockquote') { | ||
37 | return parent::getChildDef($def); | ||
38 | } | ||
39 | return new HTMLPurifier_ChildDef_StrictBlockquote($def->content_model); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | // vim: et sw=4 sts=4 | ||