1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

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).
This commit is contained in:
William M. Brack
2004-10-02 22:07:48 +00:00
parent d0407520d8
commit d1757abcb8
4 changed files with 47 additions and 9 deletions

View File

@@ -2168,11 +2168,11 @@ htmlParseHTMLName(htmlParserCtxtPtr ctxt) {
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;