From 296df2ae4515888760eeecdf66f3b6a024e09c8f Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 11 Jul 2014 11:31:11 +0200 Subject: [PATCH] Fixed broken/missing encoding of meta tag values --- .../files/lib/system/MetaTagHandler.class.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/wcfsetup/install/files/lib/system/MetaTagHandler.class.php b/wcfsetup/install/files/lib/system/MetaTagHandler.class.php index d4fc9bd039..d8dc2f3d77 100644 --- a/wcfsetup/install/files/lib/system/MetaTagHandler.class.php +++ b/wcfsetup/install/files/lib/system/MetaTagHandler.class.php @@ -25,12 +25,6 @@ class MetaTagHandler extends SingletonFactory implements \Countable, \Iterator { */ protected $indexToObject = null; - /** - * regex object - * @var \wcf\system\Regex; - */ - protected $regex = null; - /** * list of meta tags * @var array @@ -41,8 +35,6 @@ class MetaTagHandler extends SingletonFactory implements \Countable, \Iterator { * @see \wcf\system\SingletonFactory::init() */ protected function init() { - $this->regex = new Regex('^https?://'); - // set default tags $this->addTag('description', 'description', WCF::getLanguage()->get(META_DESCRIPTION)); $this->addTag('keywords', 'keywords', WCF::getLanguage()->get(META_KEYWORDS)); @@ -58,10 +50,6 @@ class MetaTagHandler extends SingletonFactory implements \Countable, \Iterator { * @param boolean $isProperty */ public function addTag($identifier, $name, $value, $isProperty = false) { - if (!$this->regex->match($value)) { - $value = StringUtil::encodeHTML($value); - } - if (!isset($this->objects[$identifier])) { $this->indexToObject[] = $identifier; } @@ -104,7 +92,7 @@ class MetaTagHandler extends SingletonFactory implements \Countable, \Iterator { public function current() { $tag = $this->objects[$this->indexToObject[$this->index]]; - return ''; + return ''; } /** @@ -138,4 +126,3 @@ class MetaTagHandler extends SingletonFactory implements \Countable, \Iterator { return isset($this->indexToObject[$this->index]); } } - -- 2.20.1