When reading mail messages, you won't get all spaces replaced with   --
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 17 Oct 2000 22:05:57 +0000 (22:05 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 17 Oct 2000 22:05:57 +0000 (22:05 +0000)
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

functions/strings.php

index 3b1ea5a805d9ce8f5310a7335cb827da26e4c125..10f896f4b067084a18a10fb3e6af4221b8ff2704 100644 (file)
          $line = charset_decode($charset, $line);
          $line = str_replace("\t", '        ', $line);
          
-         $line = str_replace(' ', '&nbsp;', $line);
+         // We need to do it twice to catch times where there
+         // are an odd number of spaces
+         $line = str_replace('  ', '&nbsp; ', $line);
+         $line = str_replace('  ', '&nbsp; ', $line);
          $line = nl2br($line);
 
          parseUrl ($line);
           $host = $SERVER_NAME;
       }
       
-      // Workaround to possibly get rid of extra port definitions.
       $port = '';
       if (! strstr($host, ':'))
       {