moriyoshi Wed Apr 13 04:08:29 2005 EDT
Modified files: (Branch: PHP_4_3)
/php-src NEWS
/php-src/ext/mbstring/libmbfl/mbfl mbfilter.c
Log:
- MFH: commit the pending patch (bug #32311).
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.873&r2=1.1247.2.874&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.873 php-src/NEWS:1.1247.2.874
--- php-src/NEWS:1.1247.2.873 Fri Apr 8 16:35:01 2005
+++ php-src/NEWS Wed Apr 13 04:08:25 2005
@@ -15,6 +15,8 @@
longer then the original string). (Ilia)
- Fixed bug #32491 (File upload error - unable to create a temporary file).
(Uwe Schindler)
+- Fixed bug #32311 (mb_encode_mimeheader() does not properly escape
characters).
+ (Moriyoshi)
31 Mar 2005, Version 4.3.11
- Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony)
http://cvs.php.net/diff.php/php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c?r1=1.1.2.5&r2=1.1.2.6&ty=u
Index: php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c
diff -u php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.1.2.5
php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.1.2.6
--- php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.1.2.5 Wed Mar 23
18:57:42 2005
+++ php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c Wed Apr 13 04:08:28 2005
@@ -1960,6 +1960,25 @@
static int
mime_header_encoder_collector(int c, void *data)
{
+ static int qp_table[256] = {
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x00 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x00 */
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */
+ 0, 0, 0, 0, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 1, 0, 1, /* 0x10 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x50 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x70 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x80 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x90 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xA0 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xB0 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xC0 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xD0 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xE0 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 /* 0xF0 */
+ };
+
int n;
struct mime_header_encoder_data *pe = (struct mime_header_encoder_data
*)data;
@@ -1969,7 +1988,7 @@
break;
default: /* ASCII */
- if (c >= 0x21 && c < 0x7f) { /* ASCII exclude SPACE and CTLs
*/
+ if (!qp_table[(c & 0xff)]) { /* ordinary characters */
mbfl_memory_device_output(c, &pe->tmpdev);
pe->status1 = 1;
} else if (pe->status1 == 0 && c == 0x20) { /* repeat SPACE
*/
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php