mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
fixed a XML Namespace compliance bug reported by Alexander Grimalovsky
* parser.c: fixed a XML Namespace compliance bug reported by Alexander Grimalovsky Daniel
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Wed Oct 16 20:01:46 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* parser.c: fixed a XML Namespace compliance bug reported by
|
||||||
|
Alexander Grimalovsky
|
||||||
|
|
||||||
Wed Oct 16 17:18:42 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
Wed Oct 16 17:18:42 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* HTMLtree.c: fixed serialization of script and style when
|
* HTMLtree.c: fixed serialization of script and style when
|
||||||
|
21
parser.c
21
parser.c
@ -1688,11 +1688,30 @@ xmlSplitQName(xmlParserCtxtPtr ctxt, const xmlChar *name, xmlChar **prefix) {
|
|||||||
|
|
||||||
|
|
||||||
if (c == ':') {
|
if (c == ':') {
|
||||||
c = *cur++;
|
c = *cur;
|
||||||
if (c == 0) return(ret);
|
if (c == 0) return(ret);
|
||||||
*prefix = ret;
|
*prefix = ret;
|
||||||
len = 0;
|
len = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check that the first character is proper to start
|
||||||
|
* a new name
|
||||||
|
*/
|
||||||
|
if (!(((c >= 0x61) && (c <= 0x7A)) ||
|
||||||
|
((c >= 0x41) && (c <= 0x5A)) ||
|
||||||
|
(c == '_') || (c == ':'))) {
|
||||||
|
int l;
|
||||||
|
int first = CUR_SCHAR(cur, l);
|
||||||
|
|
||||||
|
if (!IS_LETTER(first) && (first != '_')) {
|
||||||
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
|
ctxt->sax->error(ctxt->userData,
|
||||||
|
"Name %s is not XML Namespace compliant\n",
|
||||||
|
name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cur++;
|
||||||
|
|
||||||
while ((c != 0) && (len < max)) { /* tested bigname2.xml */
|
while ((c != 0) && (len < max)) { /* tested bigname2.xml */
|
||||||
buf[len++] = c;
|
buf[len++] = c;
|
||||||
c = *cur++;
|
c = *cur++;
|
||||||
|
Reference in New Issue
Block a user