Fix bug with hex entities in entities_to_utf8()
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Sat, 10 Apr 2004 19:45:25 +0000 (19:45 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Sat, 10 Apr 2004 19:45:25 +0000 (19:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@194 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_cs.php

index 3d61271..f396e87 100755 (executable)
@@ -436,8 +436,11 @@ class t3lib_cs {
                foreach($parts as $k => $v)     {
                        if ($k%2)       {
                                if (substr($v,0,1)=='#')        {       // Dec or hex entities:
-                                       if (substr($v,1,1)=='x')        $v=hexdec(substr($v,2));
-                                       $parts[$k] = $this->UnumberToChar(substr($v,1));
+                                       if (substr($v,1,1)=='x')        {
+                                               $parts[$k] = $this->UnumberToChar(hexdec(substr($v,2)));
+                                       } else {
+                                               $parts[$k] = $this->UnumberToChar(substr($v,1));
+                                       }
                                } elseif ($alsoStdHtmlEnt && $trans_tbl['&'.$v.';']) {  // Other entities:
                                        $parts[$k] = $this->utf8_encode($trans_tbl['&'.$v.';'],'iso-8859-1');
                                } else {        // No conversion: