From: fidian Date: Fri, 27 Jul 2001 23:40:40 +0000 (+0000) Subject: trim() -> rtrim() to avoid weird spacing problem I created. X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=907aba419237fba0317f7abb2f27bb224592a5b7 trim() -> rtrim() to avoid weird spacing problem I created. Maybe opera just had lines that were 1 char too long. Luke -- feel like testing? git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1464 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/compose.php b/src/compose.php index 06c676fb..b0db9b73 100644 --- a/src/compose.php +++ b/src/compose.php @@ -431,11 +431,12 @@ // Rewrap $body so that no line is bigger than $editor_size // This should only really kick in the sqWordWrap function // if the browser doesn't support "HARD" as the wrap type + // Or, in Opera's case, something goes wrong. $body = explode("\n", $body); $newBody = ''; foreach ($body as $line) { - $line = trim($line); - if (strlen($line) <= $editor_size) + $line = rtrim($line); + if (strlen($line) <= $editor_size + 1) $newBody .= $line . "\n"; else { sqWordWrap($line, $editor_size) . "\n";