*/
protected $indexToObject = null;
- /**
- * regex object
- * @var \wcf\system\Regex;
- */
- protected $regex = null;
-
/**
* list of meta tags
* @var array
* @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));
* @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;
}
public function current() {
$tag = $this->objects[$this->indexToObject[$this->index]];
- return '<meta ' . ($tag['isProperty'] ? 'property' : 'name') . '="' . $tag['name'] . '" content="' . $tag['value'] . '" />';
+ return '<meta ' . ($tag['isProperty'] ? 'property' : 'name') . '="' . $tag['name'] . '" content="' . StringUtil::encodeHTML($tag['value']) . '" />';
}
/**
return isset($this->indexToObject[$this->index]);
}
}
-