aboutsummaryrefslogtreecommitdiffstats
path: root/library/HTMLPurifier/ChildDef/Chameleon.php
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2015-01-11 16:22:59 +0100
committerChristian Vogeley <christian.vogeley@hotmail.de>2015-01-11 16:22:59 +0100
commitf0c7612bcd49d32e408e67ac1829ee891c677f7e (patch)
treed4cff4aa2d728524b631776ffffee71f42056421 /library/HTMLPurifier/ChildDef/Chameleon.php
parent43f143a211c75138d09ceb89acc48ea7d5c31ca9 (diff)
parent10102ac2ac4d5b02012a9794e23656717ab05556 (diff)
downloadvolse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.tar.gz
volse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.tar.bz2
volse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: doc/html/classRedmatrix_1_1Import_1_1Import-members.html doc/html/classRedmatrix_1_1Import_1_1Import.js
Diffstat (limited to 'library/HTMLPurifier/ChildDef/Chameleon.php')
-rw-r--r--library/HTMLPurifier/ChildDef/Chameleon.php33
1 files changed, 26 insertions, 7 deletions
diff --git a/library/HTMLPurifier/ChildDef/Chameleon.php b/library/HTMLPurifier/ChildDef/Chameleon.php
index 15c364ee3..7439be26b 100644
--- a/library/HTMLPurifier/ChildDef/Chameleon.php
+++ b/library/HTMLPurifier/ChildDef/Chameleon.php
@@ -14,33 +14,52 @@ class HTMLPurifier_ChildDef_Chameleon extends HTMLPurifier_ChildDef
/**
* Instance of the definition object to use when inline. Usually stricter.
+ * @type HTMLPurifier_ChildDef_Optional
*/
public $inline;
/**
* Instance of the definition object to use when block.
+ * @type HTMLPurifier_ChildDef_Optional
*/
public $block;
+ /**
+ * @type string
+ */
public $type = 'chameleon';
/**
- * @param $inline List of elements to allow when inline.
- * @param $block List of elements to allow when block.
+ * @param array $inline List of elements to allow when inline.
+ * @param array $block List of elements to allow when block.
*/
- public function __construct($inline, $block) {
+ public function __construct($inline, $block)
+ {
$this->inline = new HTMLPurifier_ChildDef_Optional($inline);
- $this->block = new HTMLPurifier_ChildDef_Optional($block);
+ $this->block = new HTMLPurifier_ChildDef_Optional($block);
$this->elements = $this->block->elements;
}
- public function validateChildren($tokens_of_children, $config, $context) {
+ /**
+ * @param HTMLPurifier_Node[] $children
+ * @param HTMLPurifier_Config $config
+ * @param HTMLPurifier_Context $context
+ * @return bool
+ */
+ public function validateChildren($children, $config, $context)
+ {
if ($context->get('IsInline') === false) {
return $this->block->validateChildren(
- $tokens_of_children, $config, $context);
+ $children,
+ $config,
+ $context
+ );
} else {
return $this->inline->validateChildren(
- $tokens_of_children, $config, $context);
+ $children,
+ $config,
+ $context
+ );
}
}
}