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 691eb0112ac3058db36fd9d864b032b3feac2f9b..9333f177fb8755c6ce067fe08ba85b3d611eebe4 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] );
     }