Fix from stable that should have gone in here too.
[squirrelmail.git] / functions / mime.php
index 249cea364dffdfb0bcbf6f3db954d97cad36bbbe..a65e5619b0b42ba1baed4ee70c7114ed8398dfa8 100644 (file)
@@ -676,6 +676,14 @@ function decodeHeader ($string, $utfencode=true,$htmlsave=true) {
         }
         ++$i;
     }
+    /* remove the first added space */
+    if ($ret) {
+        if ($htmlsave) {
+            $ret = substr($ret,6);
+        } else {
+            $ret = substr($ret,1);
+        }
+    }
 
     return $ret;
 }