Index: typo3/template.php =================================================================== --- typo3/template.php (Revision 8878) +++ typo3/template.php (Arbeitskopie) @@ -722,18 +722,18 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">'; break; + case 'xhtml_trans': + $headerStart = ''; + // The fallthrough is intended as HTML5, as this is the default for the BE since TYPO3 4.5 case 'html_5': + default: $headerStart = '' . LF; $htmlTag = ''; // disable rendering of XHTML tags $this->getPageRenderer()->setRenderXhtml(FALSE); break; - // The fallthrough is intended as XHTML 1.0 transitional is the default for the BE. - case 'xhtml_trans': - default: - $headerStart = ''; } $this->pageRenderer->setHtmlTag($htmlTag); @@ -754,7 +754,7 @@ $xmlStylesheet = ''; // Add the XML prologue for XHTML doctypes - if ($this->docType !== 'html_3' && $this->docType !== 'html_5') { + if (strpos($this->doctype, 'xhtml') !== FALSE) { // Put the XML prologue before or after the doctype declaration according to browser if ($browserInfo['browser'] === 'msie' && $browserInfo['version'] < 7) { $headerStart = $headerStart . LF . $xmlPrologue;