aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2014-02-21 15:57:10 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2014-02-21 15:57:10 +0100
commit99679d06884120c57f43b44e55e03595f1f87bed (patch)
treea3f2a1aa1afdaeca1386d0c6e8a75344fd2241fb /inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef.php
parent655214ab30ee84884dc408488b85586f36263fcb (diff)
parentd3b47e94705e17b3ba3529cbb1dc6efe69c5d2b7 (diff)
downloadwallabag-99679d06884120c57f43b44e55e03595f1f87bed.tar.gz
wallabag-99679d06884120c57f43b44e55e03595f1f87bed.tar.zst
wallabag-99679d06884120c57f43b44e55e03595f1f87bed.zip
Merge pull request #481 from wallabag/dev1.5.2
1.5.2
Diffstat (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef.php')
-rw-r--r--inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef.php52
1 files changed, 52 insertions, 0 deletions
diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef.php
new file mode 100644
index 00000000..5d64cd41
--- /dev/null
+++ b/inc/3rdparty/htmlpurifier/HTMLPurifier/ChildDef.php
@@ -0,0 +1,52 @@
1<?php
2
3/**
4 * Defines allowed child nodes and validates nodes against it.
5 */
6abstract class HTMLPurifier_ChildDef
7{
8 /**
9 * Type of child definition, usually right-most part of class name lowercase.
10 * Used occasionally in terms of context.
11 * @type string
12 */
13 public $type;
14
15 /**
16 * Indicates whether or not an empty array of children is okay.
17 *
18 * This is necessary for redundant checking when changes affecting
19 * a child node may cause a parent node to now be disallowed.
20 * @type bool
21 */
22 public $allow_empty;
23
24 /**
25 * Lookup array of all elements that this definition could possibly allow.
26 * @type array
27 */
28 public $elements = array();
29
30 /**
31 * Get lookup of tag names that should not close this element automatically.
32 * All other elements will do so.
33 * @param HTMLPurifier_Config $config HTMLPurifier_Config object
34 * @return array
35 */
36 public function getAllowedElements($config)
37 {
38 return $this->elements;
39 }
40
41 /**
42 * Validates nodes according to definition and returns modification.
43 *
44 * @param HTMLPurifier_Node[] $children Array of HTMLPurifier_Node
45 * @param HTMLPurifier_Config $config HTMLPurifier_Config object
46 * @param HTMLPurifier_Context $context HTMLPurifier_Context object
47 * @return bool|array true to leave nodes as is, false to remove parent node, array of replacement children
48 */
49 abstract public function validateChildren($children, $config, $context);
50}
51
52// vim: et sw=4 sts=4