Index: t3lib/class.t3lib_pagerenderer.php =================================================================== --- t3lib/class.t3lib_pagerenderer.php (revision 7456) +++ t3lib/class.t3lib_pagerenderer.php (working copy) @@ -966,8 +966,8 @@ $jsFooterFiles = ''; $noJS = FALSE; - + // preRenderHook for possible manuipulation if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-preProcess'])) { $params = array ( @@ -986,7 +986,7 @@ } $jsLibs = $this->renderJsLibraries(); - + if ($this->compressCss || $this->compressJavascript) { // do the file compression $this->doCompress(); @@ -998,6 +998,18 @@ $metaTags = implode(LF, $this->metaTags); + // remove ending slashes from static header block + // if the page is beeing rendered as html (not xhtml) + // and define variable $endingSlash for further use + if ($GLOBALS['TSFE']->xhtmlVersion) { + $endingSlash = ' /'; + } else { + $this->metaCharsetTag = str_replace(' />', '>', $this->metaCharsetTag); + $this->baseUrlTag = str_replace(' />', '>', $this->baseUrlTag); + $this->shortcutTag = str_replace(' />', '>', $this->shortcutTag); + $endingSlash = ''; + } + if (count($this->cssFiles)) { foreach ($this->cssFiles as $file => $properties) { $file = t3lib_div::resolveBackPath($file); @@ -1005,7 +1017,7 @@ $tag = ''; + $endingSlash . '>'; if ($properties['allWrap'] && strpos($properties['allWrap'], '|') !== FALSE) { $tag = str_replace('|', $tag, $properties['allWrap']); } @@ -1385,4 +1397,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pagerenderer.php']) { include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_pagerenderer.php']); } -?> \ No newline at end of file +?> Index: typo3/sysext/cms/tslib/class.tslib_pagegen.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_pagegen.php (revision 7456) +++ typo3/sysext/cms/tslib/class.tslib_pagegen.php (working copy) @@ -776,8 +776,11 @@ $pageRenderer->setTitle($titleTagContent); } - $pageRenderer->addMetaTag(''); + // add ending slash only to documents rendered as xhtml + $endingSlash = $GLOBALS['TSFE']->xhtmlVersion ? ' /' : ''; + $pageRenderer->addMetaTag(''); + $conf = $GLOBALS['TSFE']->pSetup['meta.']; if (is_array($conf)) { foreach ($conf as $theKey => $theValue) { @@ -792,7 +795,7 @@ if (strtolower($key) == 'refresh') { $a = 'http-equiv'; } - $pageRenderer->addMetaTag(''); + $pageRenderer->addMetaTag(''); } } } @@ -1143,4 +1146,4 @@ var $fromTC = 0; // Means that everything is returned instead of only uid and label-field } -?> \ No newline at end of file +?>