Index: t3lib/class.t3lib_pagerenderer.php =================================================================== --- t3lib/class.t3lib_pagerenderer.php (revision 8049) +++ t3lib/class.t3lib_pagerenderer.php (working copy) @@ -591,11 +591,34 @@ /** * Adds meta data * - * @param string $meta meta data (complete metatag) + * @param string $name name attribute of meta tag + * @param string $content content attribute of meta tag + * @param string $additionalParameter key/value pairs of additional attributes * @return void */ - public function addMetaTag($meta) { - if (!in_array($meta, $this->metaTags)) { + public function addMetaTag($name, $content = '', $additionalParameter = array()) { + $additionalAttributes = ''; + // backward compatibility, check for complete meta tag + if (t3lib_div::isFirstPartOfStr($name, '<')) { + $meta = $name; + } else { + $name = 'name="' . htmlspecialchars($name) . '" '; + if (count($additionalParameter) > 0) { + foreach ($additionalParameter as $attributeName => $attributeValue) { + if ($attributeName === 'http-equiv') { + // http-equiv replace the name attribute + $name = 'http-equiv="' . htmlspecialchars($attributeValue) . '" '; + } else { + $additionalAttributes .= htmlspecialchars($attributeName) . '="' . htmlspecialchars($attributeValue) . '" '; + } + } + } + $meta = ''; + } + + if (t3lib_div::inArray($this->metaTags, $meta)) { $this->metaTags[] = $meta; } }