trim() -> rtrim() to avoid weird spacing problem I created.
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 27 Jul 2001 23:40:40 +0000 (23:40 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 27 Jul 2001 23:40:40 +0000 (23:40 +0000)
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

src/compose.php

index 06c676fb59532f55ac96390aa659fb1a064aa34f..b0db9b73a0f40d10e8c1ee1d1aaad79dbc88e423 100644 (file)
         // 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";