Changeset 5525 in subversion
- Timestamp:
- Dec 2, 2011 2:51:07 AM (18 months ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 3 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/rcube_imap.php (modified) (1 diff)
-
tests/maildecode.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r5515 r5525 2 2 =========================== 3 3 4 - Improved handling of some malformed values encoded with quoted-printable (#1488232) 4 5 - Add possibility to do LDAP bind before searching for bind DN 5 6 - Fix handling of empty <U> tags in HTML messages (#1488225) -
trunk/roundcubemail/program/include/rcube_imap.php
r5486 r5525 4165 4165 4166 4166 // encoded-word regexp 4167 $re = '/=\?([^?]+)\?([BbQq])\?([^ ?\n]*)\?=/';4167 $re = '/=\?([^?]+)\?([BbQq])\?([^\n]*?)\?=/'; 4168 4168 4169 4169 // Find all RFC2047's encoded words -
trunk/roundcubemail/tests/maildecode.php
r5034 r5525 85 85 } 86 86 87 /** 88 * Test decoding of header values 89 * Uses rcube_imap::decode_mime_string() 90 */ 91 function test_header_decode_qp() 92 { 93 $test = array( 94 // #1488232: invalid character "?" 95 'quoted-printable (1)' => array( 96 'in' => '=?utf-8?Q?Certifica=C3=A7=C3=A3??=', 97 'out' => 'Certifica=C3=A7=C3=A3?', 98 ), 99 'quoted-printable (2)' => array( 100 'in' => '=?utf-8?Q?Certifica=?= =?utf-8?Q?C3=A7=C3=A3?=', 101 'out' => 'Certifica=C3=A7=C3=A3', 102 ), 103 'quoted-printable (3)' => array( 104 'in' => '=?utf-8?Q??= =?utf-8?Q??=', 105 'out' => '', 106 ), 107 'quoted-printable (4)' => array( 108 'in' => '=?utf-8?Q??= a =?utf-8?Q??=', 109 'out' => ' a ', 110 ), 111 'quoted-printable (5)' => array( 112 'in' => '=?utf-8?Q?a?= =?utf-8?Q?b?=', 113 'out' => 'ab', 114 ), 115 'quoted-printable (6)' => array( 116 'in' => '=?utf-8?Q? ?= =?utf-8?Q?a?=', 117 'out' => ' a', 118 ), 119 'quoted-printable (7)' => array( 120 'in' => '=?utf-8?Q?___?= =?utf-8?Q?a?=', 121 'out' => ' a', 122 ), 123 ); 124 125 foreach ($test as $idx => $item) { 126 $res = $this->app->imap->decode_mime_string($item['in'], 'UTF-8'); 127 $res = quoted_printable_encode($res); 128 129 $this->assertEqual($item['out'], $res, "Header decoding for: " . $idx); 130 } 131 132 } 87 133 }
Note: See TracChangeset
for help on using the changeset viewer.
