Browse Source

When reading mail messages, you won't get all spaces replaced with   --
only the necessary ones required for spacing purposes are left. (every other)

Tyler Akins 25 years ago
parent
commit
c60acc2295
1 changed files with 4 additions and 2 deletions
  1. 4 2
      functions/strings.php

+ 4 - 2
functions/strings.php

@@ -158,7 +158,10 @@
          $line = charset_decode($charset, $line);
          $line = charset_decode($charset, $line);
          $line = str_replace("\t", '        ', $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);
          $line = nl2br($line);
 
 
          parseUrl ($line);
          parseUrl ($line);
@@ -254,7 +257,6 @@
           $host = $SERVER_NAME;
           $host = $SERVER_NAME;
       }
       }
       
       
-      // Workaround to possibly get rid of extra port definitions.
       $port = '';
       $port = '';
       if (! strstr($host, ':'))
       if (! strstr($host, ':'))
       {
       {