From cf7a1725a80d1d0066f4f318d7e83ac3da8e6383 Mon Sep 17 00:00:00 2001 From: jmunro Date: Mon, 7 Oct 2002 07:22:53 +0000 Subject: [PATCH] slightly better reply wrapping git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3788 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/compose.php b/src/compose.php index abb6ceb8..27a8ccf0 100644 --- a/src/compose.php +++ b/src/compose.php @@ -666,19 +666,18 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se } /* this corrects some wrapping/quoting problems on replies */ $rewrap_body = explode("\n", $body); - - $from = (is_array($orig_header->from)) ? - $orig_header->from[0] : $orig_header->from; + $from = (is_array($orig_header->from)) ? + $orig_header->from[0] : $orig_header->from; $body = getReplyCitation($from->getAddress(false)); sqUnWordWrap($body); $cnt = count($rewrap_body); for ($i=0;$i<$cnt;$i++) { - sqWordWrap($rewrap_body[$i], ($editor_size - 2)); + sqWordWrap($rewrap_body[$i], ($editor_size)); if (preg_match("/^(>+)/", $rewrap_body[$i], $matches)) { $gt = $matches[1]; - $body .= '>' . str_replace("\n", "\n>$gt ", $rewrap_body[$i]) ."\n"; + $body .= '>' . str_replace("\n", "\n>$gt ", rtrim($rewrap_body[$i])) ."\n"; } else { - $body .= '> ' . str_replace("\n", "\n> ", $rewrap_body[$i]) . "\n"; + $body .= '> ' . str_replace("\n", "\n> ", rtrim($rewrap_body[$i])) . "\n"; } unset($rewrap_body[$i]); } -- 2.25.1