added two new macros IS_ASCII_LETTER and IS_ASCII_DIGIT used with (html)
* include/libxml/parserInternals.h: added two new macros
IS_ASCII_LETTER and IS_ASCII_DIGIT used with (html)
parsing and xpath for testing data not necessarily
unicode.
* HTMLparser.c, xpath.c: changed use of IS_LETTER_CH and
IS_DIGIT_CH macros to ascii versions (bug 153936).
diff --git a/HTMLparser.c b/HTMLparser.c
index 10f8516..72a0870 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -2168,11 +2168,11 @@
int i = 0;
xmlChar loc[HTML_PARSER_BUFFER_SIZE];
- if (!IS_LETTER_CH(CUR) && (CUR != '_') &&
+ if (!IS_ASCII_LETTER(CUR) && (CUR != '_') &&
(CUR != ':')) return(NULL);
while ((i < HTML_PARSER_BUFFER_SIZE) &&
- ((IS_LETTER_CH(CUR)) || (IS_DIGIT_CH(CUR)) ||
+ ((IS_ASCII_LETTER(CUR)) || (IS_ASCII_DIGIT(CUR)) ||
(CUR == ':') || (CUR == '-') || (CUR == '_'))) {
if ((CUR >= 'A') && (CUR <= 'Z')) loc[i] = CUR + 0x20;
else loc[i] = CUR;