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:15:29 +0000 (15:15 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Fri, 3 Apr 2009 15:15:29 +0000 (15:15 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@5266 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_cs.php

index 802b5dc..fa3ea2f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-03  Patrick Broens  <patrick@patrickbroens.nl>
+
+       * Fixed bug #10838: t3lib_cs->utf8_decode() does not check whether the target charset is utf8
+
 2009-04-02  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed issue #10834: htmlArea RTE: IE8 now uses standard name for DOM class attribute
index 61eb4e2..efaf322 100755 (executable)
@@ -717,6 +717,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);