aboutsummaryrefslogtreecommitdiffstats
path: root/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-01 22:18:27 -0800
committerfriendica <info@friendica.com>2015-01-01 22:18:27 -0800
commita0052f0176bd079e6a94baec59fea2ec5a8d651e (patch)
treec323edd823681bc2e8ca757e7eaf8354d42c7b51 /library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php
parent545e47933a0816699c68d98a7742a03260d6a54f (diff)
downloadvolse-hubzilla-a0052f0176bd079e6a94baec59fea2ec5a8d651e.tar.gz
volse-hubzilla-a0052f0176bd079e6a94baec59fea2ec5a8d651e.tar.bz2
volse-hubzilla-a0052f0176bd079e6a94baec59fea2ec5a8d651e.zip
htmlpurifier update - compatibility issue with language library autoloader
Diffstat (limited to 'library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php')
-rw-r--r--library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php28
1 files changed, 22 insertions, 6 deletions
diff --git a/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php b/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php
index 6599c5b2d..9d77cc9aa 100644
--- a/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php
+++ b/library/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php
@@ -5,22 +5,38 @@
*/
class HTMLPurifier_AttrDef_CSS_DenyElementDecorator extends HTMLPurifier_AttrDef
{
- public $def, $element;
+ /**
+ * @type HTMLPurifier_AttrDef
+ */
+ public $def;
+ /**
+ * @type string
+ */
+ public $element;
/**
- * @param $def Definition to wrap
- * @param $element Element to deny
+ * @param HTMLPurifier_AttrDef $def Definition to wrap
+ * @param string $element Element to deny
*/
- public function __construct($def, $element) {
+ public function __construct($def, $element)
+ {
$this->def = $def;
$this->element = $element;
}
+
/**
* Checks if CurrentToken is set and equal to $this->element
+ * @param string $string
+ * @param HTMLPurifier_Config $config
+ * @param HTMLPurifier_Context $context
+ * @return bool|string
*/
- public function validate($string, $config, $context) {
+ public function validate($string, $config, $context)
+ {
$token = $context->get('CurrentToken', true);
- if ($token && $token->name == $this->element) return false;
+ if ($token && $token->name == $this->element) {
+ return false;
+ }
return $this->def->validate($string, $config, $context);
}
}