[FEATURE] Change the default doctype to html5
authorGeorg Ringer <georg.ringer@gmail.com>
Mon, 5 Nov 2012 23:00:34 +0000 (00:00 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 5 Nov 2012 23:02:31 +0000 (00:02 +0100)
Change-Id: If99bd9fb5357a39660f44a79f88cdd22528be3d8
Resolves: #39957
Releases: 6.0
Reviewed-on: http://review.typo3.org/13952
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/frontend/Classes/Page/PageGenerator.php

index 9484c3c..c5072f0 100644 (file)
@@ -357,8 +357,12 @@ class PageGenerator {
                                $docTypeParts[] = $doctype;
                        }
                } else {
                                $docTypeParts[] = $doctype;
                        }
                } else {
-                       $docTypeParts[] = '<!DOCTYPE html
-       PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
+                       $docTypeParts[] = '<!DOCTYPE html>';
+                       if ($xmlDocument){
+                               $pageRenderer->setMetaCharsetTag('<meta charset="|" />');
+                       } else {
+                               $pageRenderer->setMetaCharsetTag('<meta charset="|">');
+                       }
                }
                if ($GLOBALS['TSFE']->xhtmlVersion) {
                        $htmlTagAttributes['xml:lang'] = $htmlLang;
                }
                if ($GLOBALS['TSFE']->xhtmlVersion) {
                        $htmlTagAttributes['xml:lang'] = $htmlLang;