Changeset 5033 in subversion for trunk/roundcubemail/program/lib/Mail/mimePart.php
- Timestamp:
- Aug 9, 2011 5:46:54 AM (22 months ago)
- File:
-
- 1 edited
-
trunk/roundcubemail/program/lib/Mail/mimePart.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/lib/Mail/mimePart.php
r4295 r5033 132 132 var $_eol = "\r\n"; 133 133 134 134 135 /** 135 136 * Constructor. … … 801 802 // Structured header (make sure addr-spec inside is not encoded) 802 803 if (!empty($separator)) { 804 // Simple e-mail address regexp 805 $email_regexp = '(\S+|("\s*(?:[^"\f\n\r\t\v\b\s]+\s*)+"))@\S+'; 806 803 807 $parts = Mail_mimePart::_explodeQuotedString($separator, $value); 804 808 $value = ''; … … 818 822 819 823 // let's find phrase (name) and/or addr-spec 820 if (preg_match('/^< \S+@\S+>$/', $part)) {824 if (preg_match('/^<' . $email_regexp . '>$/', $part)) { 821 825 $value .= $part; 822 } else if (preg_match('/^ \S+@\S+$/', $part)) {826 } else if (preg_match('/^' . $email_regexp . '$/', $part)) { 823 827 // address without brackets and without name 824 828 $value .= $part; 825 } else if (preg_match('/<* \S+@\S+>*$/', $part, $matches)) {829 } else if (preg_match('/<*' . $email_regexp . '>*$/', $part, $matches)) { 826 830 // address with name (handle name) 827 831 $address = $matches[0];
Note: See TracChangeset
for help on using the changeset viewer.
