[BUGFIX] Backend doctype 'xhtml_trans' is broken
authorSteffen Gebert <steffen.gebert@typo3.org>
Wed, 29 Jun 2011 17:40:32 +0000 (19:40 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Wed, 6 Jul 2011 06:59:31 +0000 (08:59 +0200)
Since introducing HTML5 as default backend doctype (#23639), two
mistakes make it impossible to use 'xhtml_trans' as doctype for the
Backend output.

Change-Id: I57944081881259970aa3a1666568c7d0ffe006bf
Resolves: #27774
Resolves: #27745
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/3040
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/template.php

index 6163410..86b847b 100644 (file)
@@ -761,9 +761,10 @@ class template {
                                $headerStart = '<!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
-                               // The fallthrough is intended as HTML5, as this is the default for the BE since TYPO3 4.5
+                               break;
                        case 'html5':
                        default:
+                                       // The fallthrough is intended as HTML5, as this is the default for the BE since TYPO3 4.5
                                $headerStart = '<!DOCTYPE html>' . LF;
                                $htmlTag = '<html>';
                                // disable rendering of XHTML tags
@@ -794,7 +795,7 @@ class template {
                $xmlStylesheet = '<?xml-stylesheet href="#internalStyle" type="text/css"?>';
 
                        // Add the XML prologue for XHTML doctypes
-               if (strpos($this->doctype, 'xhtml') !== FALSE) {
+               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;