tony2001                Tue Aug 15 15:09:21 2006 UTC

  Modified files:              
    /php-src/ext/standard       html.c 
  Log:
  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.114&r2=1.115&diff_format=u
Index: php-src/ext/standard/html.c
diff -u php-src/ext/standard/html.c:1.114 php-src/ext/standard/html.c:1.115
--- php-src/ext/standard/html.c:1.114   Thu Mar  2 13:12:45 2006
+++ php-src/ext/standard/html.c Tue Aug 15 15:09:21 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: html.c,v 1.114 2006/03/02 13:12:45 dmitry Exp $ */
+/* $Id: html.c,v 1.115 2006/08/15 15:09:21 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

Reply via email to