fix for decode different entities
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 13 Aug 2002 11:44:41 +0000 (11:44 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 13 Aug 2002 11:44:41 +0000 (11:44 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3291 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index 8396da9c11d439da9c602956742aad9d6beeeb1d..ef06f0110ab3cf7c3e3969f189a4df1a1baf02f1 100644 (file)
@@ -465,11 +465,11 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se
         $encoding = $message->header->encoding;
        $type0 = $message->type0;
        $type1 = $message->type1;
-
         foreach ($entities as $ent) {
-           $bodypart = decodeBody(
-                     mime_fetch_body($imapConnection, $passed_id, $ent),
-                      $encoding);
+           $unencoded_bodypart = mime_fetch_body($imapConnection, $passed_id, $ent);
+          $body_part_entity = $message->getEntity($ent);
+          $bodypart = decodeBody($unencoded_bodypart,
+                                 $body_part_entity->header->encoding);
           if ($type1 == 'html') {
               $bodypart = strip_tags($bodypart);
           }