+2010-05-01 Susanne Moog <typo3@susanne-moog.de>
+
+ * Fixed bug #236: Rendered pages do not validate if no doctype is set. (thanks to Christian Buelter)
+
2010-04-30 Benjamin Mack <benni@typo3.org>
* Added feature #12502: Use HMACs for authencity and integrity checks (Thanks to Marcus Krause and the TYPO3 Security Team)
$jsFooterFiles = '';
$noJS = FALSE;
-
+
// preRenderHook for possible manuipulation
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-preProcess'])) {
}
$jsLibs = $this->renderJsLibraries();
-
+
if ($this->compressCss || $this->compressJavascript) {
// do the file compression
$this->doCompress();
$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);
$tag = '<link rel="' . $properties['rel'] . '" type="text/css" href="' .
htmlspecialchars($file) . '" media="' . $properties['media'] . '"' .
($properties['title'] ? ' title="' . $properties['title'] . '"' : '') .
- ' />';
+ $endingSlash . '>';
if ($properties['allWrap'] && strpos($properties['allWrap'], '|') !== FALSE) {
$tag = str_replace('|', $tag, $properties['allWrap']);
}
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
+?>
$pageRenderer->setTitle($titleTagContent);
}
- $pageRenderer->addMetaTag('<meta name="generator" content="TYPO3 ' . TYPO3_branch . ' CMS" />');
+ // add ending slash only to documents rendered as xhtml
+ $endingSlash = $GLOBALS['TSFE']->xhtmlVersion ? ' /' : '';
+
+ $pageRenderer->addMetaTag('<meta name="generator" content="TYPO3 ' . TYPO3_branch . ' CMS"' . $endingSlash . '>');
$conf = $GLOBALS['TSFE']->pSetup['meta.'];
if (is_array($conf)) {
if (strtolower($key) == 'refresh') {
$a = 'http-equiv';
}
- $pageRenderer->addMetaTag('<meta ' . $a . '="' . $key . '" content="' . htmlspecialchars(trim($val)) . '" />');
+ $pageRenderer->addMetaTag('<meta ' . $a . '="' . $key . '" content="' . htmlspecialchars(trim($val)) . '"' . $endingSlash . '>');
}
}
}
var $fromTC = 0; // Means that everything is returned instead of only uid and label-field
}
-?>
\ No newline at end of file
+?>