Updated documentation for sqimap_find_displayable_name()
authorantipode <antipode@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 28 Dec 2001 21:23:28 +0000 (21:23 +0000)
committerantipode <antipode@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 28 Dec 2001 21:23:28 +0000 (21:23 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1995 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_general.php

index 691eb01..9333f17 100755 (executable)
@@ -334,13 +334,17 @@ function sqimap_find_email ($string) {
 
 
 /*
-*  Takes the From: field, and creates a displayable name.
-*    Luke Ehresman <lkehresman@yahoo.com>
-*           becomes:   Luke Ehresman
-*    <lkehresman@yahoo.com>
-*           becomes:   lkehresman@yahoo.com
-*/
+ *  Takes the From: field, and creates a displayable name.
+ *    Luke Ehresman   <lkehresman@yahoo.com>
+ *    "Luke Ehresman" <lkehresman@yahoo.com>
+ *    lkehresman@yahoo.com (Luke Ehresman)
+ *           become:   Luke Ehresman
+ *    <lkehresman@yahoo.com>
+ *           becomes:   lkehresman@yahoo.com
+ */
 function sqimap_find_displayable_name ($string) {
+    $string = trim($string);
+    
     if ( ereg('^(.+)<.*>', $string, $regs) ) {
         $string = ereg_replace ('"', '', $regs[1] );
     }