tony2001 Tue Aug 15 15:09:38 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard html.c
Log:
MFH: don't try to use "auto", "none" and "pass" charsets returned from
mbstring
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.111.2.2&r2=1.111.2.2.2.1&diff_format=u
Index: php-src/ext/standard/html.c
diff -u php-src/ext/standard/html.c:1.111.2.2
php-src/ext/standard/html.c:1.111.2.2.2.1
--- php-src/ext/standard/html.c:1.111.2.2 Sat Feb 25 21:32:11 2006
+++ php-src/ext/standard/html.c Tue Aug 15 15:09:38 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: html.c,v 1.111.2.2 2006/02/25 21:32:11 rasmus Exp $ */
+/* $Id: html.c,v 1.111.2.2.2.1 2006/08/15 15:09:38 tony2001 Exp $ */
/*
* HTML entity resources:
@@ -756,6 +756,15 @@
charset_hint = Z_STRVAL_P(uf_result);
len = Z_STRLEN_P(uf_result);
+ if (len == 4) { /* sizeof(none|auto|pass)-1 */
+ if (!memcmp("pass", charset_hint,
sizeof("pass") - 1) ||
+ !memcmp("auto", charset_hint,
sizeof("auto") - 1) ||
+ !memcmp("none", charset_hint,
sizeof("none") - 1)) {
+
+ charset_hint = NULL;
+ len = 0;
+ }
+ }
goto det_charset;
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php