Fixed bug #10838: t3lib_cs->utf8_decode() does not check whether the target charset...
authorIngo Renner <ingo.renner@typo3.org>
Fri, 3 Apr 2009 15:14:07 +0000 (15:14 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Fri, 3 Apr 2009 15:14:07 +0000 (15:14 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5265 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_cs.php

index 1944153..9a207e1 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-04-03  Patrick Broens  <patrick@patrickbroens.nl>
 
        * Fixed bug #10783: Make workspaces icons skinnable
+       * Fixed bug #10838: t3lib_cs->utf8_decode() does not check whether the target charset is utf8
 
 2009-04-03  Ingo Renner  <ingo@typo3.org>
 
index d9afe0f..20b849a 100644 (file)
@@ -715,6 +715,10 @@ class t3lib_cs {
         */
        function utf8_decode($str,$charset,$useEntityForNoChar=0)       {
 
+               if ($charset === 'utf-8') {
+                       return $str;
+               }
+
                        // Charset is case-insensitive.
                if ($this->initCharset($charset))       {       // Parse conv. table if not already...
                        $strLen = strlen($str);