Changeset 1787 in subversion
- Timestamp:
- Sep 13, 2008 2:57:37 PM (5 years ago)
- Location:
- trunk/roundcubemail/program/include
- Files:
-
- 2 edited
-
main.inc (modified) (1 diff)
-
rcube_mail_mime.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/main.inc
r1775 r1787 644 644 { 645 645 $out = html_entity_decode(html_entity_decode($content)); 646 $out = preg_replace('/\\\([ a-z0-9]{4})/ie', "chr(hexdec('\\1'))", $out);646 $out = preg_replace('/\\\([0-9a-f]{4})/ie', "chr(hexdec('\\1'))", $out); 647 647 $out = preg_replace('#/\*.*\*/#Um', '', $out); 648 648 return $out; -
trunk/roundcubemail/program/include/rcube_mail_mime.php
r1772 r1787 142 142 143 143 //This header contains non ASCII chars and should be encoded. 144 if (preg_match(' #[\x00-\x1F\x80-\xFF]{1}#', $value)) {144 if (preg_match('/[\x80-\xFF]{1}/', $value)) { 145 145 $suffix = ''; 146 146 // Don't encode e-mail address … … 161 161 // quoted-printable encoding has been selected 162 162 $mode = 'Q'; 163 $encoded = preg_replace('/([\x3F\x00-\x1F\x80-\xFF])/e', "'='.sprintf('%02X', ord('\\1'))", $value);164 // replace spaces with _165 $encoded = str_replace(' ', '_', $encoded);163 // replace ?, =, _ and spaces 164 $encoded = str_replace(array('=','_','?',' '), array('=3D','=5F','=3F','_'), $value); 165 $encoded = preg_replace('/([\x80-\xFF])/e', "'='.sprintf('%02X', ord('\\1'))", $encoded); 166 166 } 167 167
Note: See TracChangeset
for help on using the changeset viewer.
