diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-18 20:07:46 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-18 20:07:46 +0100 |
commit | adf17b677edeb2387671f6a0f12123e7497b5938 (patch) | |
tree | 8fd87d7bf5699488ffc12afa991011e80ac1011b /inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef/Chameleon.php | |
parent | 894cd087f41d605f2f093aaad1300825f705e009 (diff) | |
download | wallabag-adf17b677edeb2387671f6a0f12123e7497b5938.tar.gz wallabag-adf17b677edeb2387671f6a0f12123e7497b5938.tar.zst wallabag-adf17b677edeb2387671f6a0f12123e7497b5938.zip |
remove 3rd libraries
Diffstat (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef/Chameleon.php')
-rw-r--r-- | inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef/Chameleon.php | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef/Chameleon.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef/Chameleon.php deleted file mode 100644 index f6b2f22e..00000000 --- a/inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef/Chameleon.php +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | /** | ||
4 | * Definition that uses different definitions depending on context. | ||
5 | * | ||
6 | * The del and ins tags are notable because they allow different types of | ||
7 | * elements depending on whether or not they're in a block or inline context. | ||
8 | * Chameleon allows this behavior to happen by using two different | ||
9 | * definitions depending on context. While this somewhat generalized, | ||
10 | * it is specifically intended for those two tags. | ||
11 | */ | ||
12 | class HTMLPurifier_ChildDef_Chameleon extends HTMLPurifier_ChildDef | ||
13 | { | ||
14 | |||
15 | /** | ||
16 | * Instance of the definition object to use when inline. Usually stricter. | ||
17 | * @type HTMLPurifier_ChildDef_Optional | ||
18 | */ | ||
19 | public $inline; | ||
20 | |||
21 | /** | ||
22 | * Instance of the definition object to use when block. | ||
23 | * @type HTMLPurifier_ChildDef_Optional | ||
24 | */ | ||
25 | public $block; | ||
26 | |||
27 | /** | ||
28 | * @type string | ||
29 | */ | ||
30 | public $type = 'chameleon'; | ||
31 | |||
32 | /** | ||
33 | * @param array $inline List of elements to allow when inline. | ||
34 | * @param array $block List of elements to allow when block. | ||
35 | */ | ||
36 | public function __construct($inline, $block) | ||
37 | { | ||
38 | $this->inline = new HTMLPurifier_ChildDef_Optional($inline); | ||
39 | $this->block = new HTMLPurifier_ChildDef_Optional($block); | ||
40 | $this->elements = $this->block->elements; | ||
41 | } | ||
42 | |||
43 | /** | ||
44 | * @param HTMLPurifier_Node[] $children | ||
45 | * @param HTMLPurifier_Config $config | ||
46 | * @param HTMLPurifier_Context $context | ||
47 | * @return bool | ||
48 | */ | ||
49 | public function validateChildren($children, $config, $context) | ||
50 | { | ||
51 | if ($context->get('IsInline') === false) { | ||
52 | return $this->block->validateChildren( | ||
53 | $children, | ||
54 | $config, | ||
55 | $context | ||
56 | ); | ||
57 | } else { | ||
58 | return $this->inline->validateChildren( | ||
59 | $children, | ||
60 | $config, | ||
61 | $context | ||
62 | ); | ||
63 | } | ||
64 | } | ||
65 | } | ||
66 | |||
67 | // vim: et sw=4 sts=4 | ||