Browse Source

Add support for hexadecimal-style numeric entities (&#x..;)

PEAR_1_4DEV
Moriyoshi Koizumi 23 years ago
parent
commit
04bcd89277
  1. 6
      ext/standard/html.c

6
ext/standard/html.c

@ -926,7 +926,11 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new
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) {

Loading…
Cancel
Save