From 5b755d9f1961a88b412f1718fbd5270d3eb60804 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Wed, 19 Nov 2003 03:52:03 +0000 Subject: [PATCH] Reformat of html messages a bit cleaner git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6181 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compose.php b/src/compose.php index 466bbfa1..a2b7399e 100644 --- a/src/compose.php +++ b/src/compose.php @@ -611,8 +611,11 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se $bodypart = decodeBody($unencoded_bodypart, $body_part_entity->header->encoding); if ($type1 == 'html') { - $bodypart = str_replace(array(' ','>','<'),array(' ','<','>'),$bodypart); + $bodypart = str_replace("\n", ' ', $bodypart); + $bodypart = preg_replace(array('/

/i','//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