[BUGFIX] Meta charset tag adjustment for html5 doctype
authorSusanne Moog <typo3@susannemoog.de>
Sat, 21 May 2011 13:30:29 +0000 (15:30 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Sun, 29 May 2011 13:54:53 +0000 (15:54 +0200)
The meta charset tag is not fully compatible with html5.
Remove the namespace to avoid the validator warning.

Change-Id: I8275b677e5394f59dbd1efc65ced93f57149ebae
Resolves: #24212
Reviewed-on: http://review.typo3.org/2280
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
t3lib/class.t3lib_pagerenderer.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php

index fc287a9..7348a9c 100644 (file)
@@ -249,6 +249,16 @@ class t3lib_PageRenderer implements t3lib_Singleton {
        }
 
        /**
+        * Set the meta charset tag
+        *
+        * @param string $metaCharsetTag
+        * @return void
+        */
+       public function setMetaCharsetTag($metaCharsetTag) {
+               $this->metaCharsetTag = $metaCharsetTag;
+       }
+
+       /**
         * Sets html tag
         *
         * @param string $htmlTag       html tag
@@ -555,6 +565,15 @@ class t3lib_PageRenderer implements t3lib_Singleton {
        }
 
        /**
+        * Get meta charset
+        *
+        * @return string
+        */
+       public function getMetaCharsetTag() {
+               return $this->metaCharsetTag;
+       }
+
+       /**
         * Gets head tag
         *
         * @return string $tag  head tag
index d44a52c..5a863cd 100644 (file)
@@ -441,6 +441,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                                        break;
                                case 'html5' :
                                        $docTypeParts[] = '<!DOCTYPE html>';
+                                       $pageRenderer->setMetaCharsetTag('<meta charset="|" />');
                                        break;
                                case 'none' :
                                        break;