fixed a bug with email addresses not displaying right in message list
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 9 Mar 2000 13:00:16 +0000 (13:00 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 9 Mar 2000 13:00:16 +0000 (13:00 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@292 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_general.php
src/read_body.php

index 26d9107c40d5a96a156279d21d90f5fe2d8d8d61..166d8765b5f58a446a676d9b2371686e759ad5b0 100755 (executable)
          $string = substr($string, strpos($string, "<")+1);
          $string = substr($string, 0, strpos($string, ">"));
       }
-      return $string
+      return trim($string)
    }
 
    
     **           becomes:   lkehresman@yahoo.com
     ******************************************************************************/
    function sqimap_find_displayable_name ($string) {
+      $string = " ".trim($string);
       if (strpos($string, "<") && strpos($string, ">")) {
-         if (strpos($string, "<") == 0) {
+         if (strpos($string, "<") == 1) {
             $string = sqimap_find_email($string);
          } else {
             $string = substr($string, 0, strpos($string, "<"));
index 757a3d96f6d8e05f9c1e8369ed77f4d6e2450b7a..6cafd3feed0b756764045e8fe282b56378ffb7e6 100644 (file)
@@ -88,8 +88,8 @@
    }
 
    /** make sure everything will display in HTML format **/
-   $from_name = decodeHeader($message["HEADER"]["FROM"]);
-   $subject = decodeHeader(stripslashes($message["HEADER"]["SUBJECT"]));
+   $from_name = htmlspecialchars(decodeHeader($message["HEADER"]["FROM"]));
+   $subject = htmlspecialchars(decodeHeader(stripslashes($message["HEADER"]["SUBJECT"])));
 
    echo "<BR>";
    echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=98% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";