From b455e47bc278c8ab78f16f7325f9a1d5e22dcab7 Mon Sep 17 00:00:00 2001 From: stekkel Date: Mon, 14 Jun 2004 19:38:26 +0000 Subject: [PATCH] fix for replying to html mail. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7639 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compose.php b/src/compose.php index 052803e7..a28d0782 100644 --- a/src/compose.php +++ b/src/compose.php @@ -617,16 +617,19 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se $type0 = $message->type0; $type1 = $message->type1; foreach ($entities as $ent) { + $msg = $message->getEntity($ent); + $type0 = $msg->type0; + $type1 = $msg->type1; $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 = str_replace("\n", ' ', $bodypart); - $bodypart = preg_replace(array('/

/i','//i'), "\n", $bodypart); + $bodypart = preg_replace(array('/

/i','/

<\/div>/i','//i','/<\/?div>/i'), "\n", $bodypart); + $bodypart = str_replace(array(' ','>','<'),array(' ','>','<'),$bodypart); $bodypart = strip_tags($bodypart); - } if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { -- 2.25.1