From: fidian Date: Tue, 17 Oct 2000 22:05:57 +0000 (+0000) Subject: When reading mail messages, you won't get all spaces replaced with   -- X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5ff8453303df6d2c585aea49fe83663498f4801c;p=squirrelmail.git When reading mail messages, you won't get all spaces replaced with   -- only the necessary ones required for spacing purposes are left. (every other) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@806 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/strings.php b/functions/strings.php index 3b1ea5a8..10f896f4 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -158,7 +158,10 @@ $line = charset_decode($charset, $line); $line = str_replace("\t", ' ', $line); - $line = str_replace(' ', ' ', $line); + // We need to do it twice to catch times where there + // are an odd number of spaces + $line = str_replace(' ', '  ', $line); + $line = str_replace(' ', '  ', $line); $line = nl2br($line); parseUrl ($line); @@ -254,7 +257,6 @@ $host = $SERVER_NAME; } - // Workaround to possibly get rid of extra port definitions. $port = ''; if (! strstr($host, ':')) {