[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 14:25:04 +0000 (16:25 +0200)
The meta charset tag is not fully compatible with html5.
Remove the namespace to avoid the validator warning.

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

index 48fc4e1..aacba64 100644 (file)
@@ -250,6 +250,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
@@ -556,6 +566,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 ecbc8ba..1a30e80 100644 (file)
@@ -435,6 +435,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;