Changeset 5945 in subversion


Ignore:
Timestamp:
Mar 2, 2012 8:09:05 AM (16 months ago)
Author:
alec
Message:
  • Fixed double-quotes handling in recipient names
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/mail/sendmail.inc

    r5842 r5945  
    180180    } else if (preg_match('/<*'.$email_regexp.'>*$/', $item, $matches)) { 
    181181      $address = $matches[0]; 
    182       $name = trim(str_replace($address, '', $item), '" '); 
     182      $name = trim(str_replace($address, '', $item)); 
     183      if ($name[0] == '"' && $name[count($name)-1] == '"') { 
     184        $name = substr($name, 1, -1); 
     185      } 
     186      $name = stripcslashes($name); 
    183187      $address = rcube_idn_to_ascii(trim($address, '<>')); 
    184188      $result[] = format_email_recipient($address, $name); 
Note: See TracChangeset for help on using the changeset viewer.