moriyoshi               Thu Oct  2 15:07:59 2003 EDT

  Modified files:              
    /php-src/ext/standard       html.c 
  Log:
  Add support for hexadecimal-style numeric entities (&#x..;)
  
  
Index: php-src/ext/standard/html.c
diff -u php-src/ext/standard/html.c:1.88 php-src/ext/standard/html.c:1.89
--- php-src/ext/standard/html.c:1.88    Thu Oct  2 15:06:44 2003
+++ php-src/ext/standard/html.c Thu Oct  2 15:07:59 2003
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: html.c,v 1.88 2003/10/02 19:06:44 moriyoshi Exp $ */
+/* $Id: html.c,v 1.89 2003/10/02 19:07:59 moriyoshi Exp $ */
 
 /*
  * HTML entity resources:
@@ -926,7 +926,11 @@
                                if (p[1] == '#') {
                                        int invalid_code = 0;
 
-                                       code = strtol(p + 2, &next, 10);
+                                       if (p[2] == 'x' || p[2] == 'X') {
+                                               code = strtol(p + 3, &next, 16);
+                                       } else {
+                                               code = strtol(p + 2, &next, 10);
+                                       }
 
                                        if (next != NULL && *next == ';') {
                                                switch (charset) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to