Changeset 1576 in subversion


Ignore:
Timestamp:
Jun 25, 2008 2:33:10 AM (5 years ago)
Author:
alec
Message:

Patched Mail/mimePart.php (http://pear.php.net/bugs/bug.php?id=14232)

Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r1570 r1576  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42008/06/24 (alec) 
     5---------- 
     6- Patched Mail/MimePart.php (http://pear.php.net/bugs/bug.php?id=14232) 
    37 
    482008/06/24 (alec) 
  • trunk/roundcubemail/program/lib/Mail/mimePart.php

    r1530 r1576  
    399399        $shouldEncode = 0; 
    400400        $secondAsterisk = ''; 
    401         if (preg_match('#([\x80-\xFF]){1}#', $value)) { 
     401        if (preg_match('#([ \x80-\xFF \*\'\\%\t(\)\<\>\@\,\;\:\\\"/\[\]\?\=]){1}#', $value)) { 
    402402            $shouldEncode = 1; 
    403403        } elseif ($charset && (strtolower($charset) != 'us-ascii')) { 
     
    407407        } 
    408408        if ($shouldEncode) { 
    409             $search  = array('%',   ' ',   "\t"); 
    410             $replace = array('%25', '%20', '%09'); 
    411             $encValue = str_replace($search, $replace, $value); 
    412             $encValue = preg_replace('#([\x80-\xFF])#e', '"%" . strtoupper(dechex(ord("\1")))', $encValue); 
     409            $encValue = preg_replace('#([\x80-\xFF \*\'\%\t\(\)\<\>\@\,\;\:\\\"/\[\]\?\=])#e', '"%" . strtoupper(dechex(ord("\1")))', $value); 
    413410            $value = "$charset'$language'$encValue"; 
    414411            $secondAsterisk = '*'; 
Note: See TracChangeset for help on using the changeset viewer.