mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-08 17:42:14 +03:00
isExtender was missing a char % are acceptable in the internal subset if
* xmlInternald.c: isExtender was missing a char * parser.c include/libxml/parser.h: % are acceptable in the internal subset if within a PUBLIC ID Daniel
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Mon Feb 18 20:16:15 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* xmlInternald.c: isExtender was missing a char
|
||||||
|
* parser.c include/libxml/parser.h: % are acceptable in the
|
||||||
|
internal subset if within a PUBLIC ID
|
||||||
|
|
||||||
Mon Feb 18 19:27:32 CET 2002 Daniel Veillard <daniel@veillard.com>
|
Mon Feb 18 19:27:32 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* SAX.c parserInternals.c valid.c: more work on the conformance
|
* SAX.c parserInternals.c valid.c: more work on the conformance
|
||||||
|
@@ -112,7 +112,8 @@ typedef enum {
|
|||||||
XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
|
XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
|
||||||
XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
|
XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
|
||||||
XML_PARSER_EPILOG, /* the Misc* after the last end tag */
|
XML_PARSER_EPILOG, /* the Misc* after the last end tag */
|
||||||
XML_PARSER_IGNORE /* within an IGNORED section */
|
XML_PARSER_IGNORE, /* within an IGNORED section */
|
||||||
|
XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
|
||||||
} xmlParserInputState;
|
} xmlParserInputState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
33
parser.c
33
parser.c
@@ -727,6 +727,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
|
|||||||
case XML_PARSER_ATTRIBUTE_VALUE:
|
case XML_PARSER_ATTRIBUTE_VALUE:
|
||||||
case XML_PARSER_PI:
|
case XML_PARSER_PI:
|
||||||
case XML_PARSER_SYSTEM_LITERAL:
|
case XML_PARSER_SYSTEM_LITERAL:
|
||||||
|
case XML_PARSER_PUBLIC_LITERAL:
|
||||||
/* we just ignore it there */
|
/* we just ignore it there */
|
||||||
return;
|
return;
|
||||||
case XML_PARSER_EPILOG:
|
case XML_PARSER_EPILOG:
|
||||||
@@ -2468,6 +2469,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) {
|
|||||||
xmlChar cur;
|
xmlChar cur;
|
||||||
xmlChar stop;
|
xmlChar stop;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
xmlParserInputState oldstate = ctxt->instate;
|
||||||
|
|
||||||
SHRINK;
|
SHRINK;
|
||||||
if (RAW == '"') {
|
if (RAW == '"') {
|
||||||
@@ -2491,6 +2493,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) {
|
|||||||
"malloc of %d byte failed\n", size);
|
"malloc of %d byte failed\n", size);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
ctxt->instate = XML_PARSER_PUBLIC_LITERAL;
|
||||||
cur = CUR;
|
cur = CUR;
|
||||||
while ((IS_PUBIDCHAR(cur)) && (cur != stop)) { /* checked */
|
while ((IS_PUBIDCHAR(cur)) && (cur != stop)) { /* checked */
|
||||||
if (len + 1 >= size) {
|
if (len + 1 >= size) {
|
||||||
@@ -2526,6 +2529,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) {
|
|||||||
} else {
|
} else {
|
||||||
NEXT;
|
NEXT;
|
||||||
}
|
}
|
||||||
|
ctxt->instate = oldstate;
|
||||||
return(buf);
|
return(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3417,7 +3421,11 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
|
|||||||
(ctxt->sax->error != NULL))
|
(ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData,
|
ctxt->sax->error(ctxt->userData,
|
||||||
"Invalid URI: %s\n", URI);
|
"Invalid URI: %s\n", URI);
|
||||||
ctxt->wellFormed = 0;
|
/*
|
||||||
|
* This really ought to be a well formedness error
|
||||||
|
* but the XML Core WG decided otherwise c.f. issue
|
||||||
|
* E26 of the XML erratas.
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
if (uri->fragment != NULL) {
|
if (uri->fragment != NULL) {
|
||||||
ctxt->errNo = XML_ERR_URI_FRAGMENT;
|
ctxt->errNo = XML_ERR_URI_FRAGMENT;
|
||||||
@@ -3426,6 +3434,10 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
|
|||||||
(ctxt->sax->error != NULL))
|
(ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData,
|
ctxt->sax->error(ctxt->userData,
|
||||||
"Fragment not allowed: %s\n", URI);
|
"Fragment not allowed: %s\n", URI);
|
||||||
|
/*
|
||||||
|
* Okay this is foolish to block those but not
|
||||||
|
* invalid URIs.
|
||||||
|
*/
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
} else {
|
} else {
|
||||||
if ((ctxt->sax != NULL) &&
|
if ((ctxt->sax != NULL) &&
|
||||||
@@ -3468,7 +3480,11 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
|
|||||||
(ctxt->sax->error != NULL))
|
(ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData,
|
ctxt->sax->error(ctxt->userData,
|
||||||
"Invalid URI: %s\n", URI);
|
"Invalid URI: %s\n", URI);
|
||||||
ctxt->wellFormed = 0;
|
/*
|
||||||
|
* This really ought to be a well formedness error
|
||||||
|
* but the XML Core WG decided otherwise c.f. issue
|
||||||
|
* E26 of the XML erratas.
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
if (uri->fragment != NULL) {
|
if (uri->fragment != NULL) {
|
||||||
ctxt->errNo = XML_ERR_URI_FRAGMENT;
|
ctxt->errNo = XML_ERR_URI_FRAGMENT;
|
||||||
@@ -3477,6 +3493,10 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
|
|||||||
(ctxt->sax->error != NULL))
|
(ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData,
|
ctxt->sax->error(ctxt->userData,
|
||||||
"Fragment not allowed: %s\n", URI);
|
"Fragment not allowed: %s\n", URI);
|
||||||
|
/*
|
||||||
|
* Okay this is foolish to block those but not
|
||||||
|
* invalid URIs.
|
||||||
|
*/
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
}
|
}
|
||||||
xmlFreeURI(uri);
|
xmlFreeURI(uri);
|
||||||
@@ -8647,6 +8667,15 @@ found_end_int_subset:
|
|||||||
#ifdef DEBUG_PUSH
|
#ifdef DEBUG_PUSH
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"PP: entering START_TAG\n");
|
"PP: entering START_TAG\n");
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case XML_PARSER_PUBLIC_LITERAL:
|
||||||
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
|
"PP: internal error, state == PUBLIC_LITERAL\n");
|
||||||
|
ctxt->instate = XML_PARSER_START_TAG;
|
||||||
|
#ifdef DEBUG_PUSH
|
||||||
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
|
"PP: entering START_TAG\n");
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -817,7 +817,7 @@ xmlIsExtender(int c) {
|
|||||||
case 0x0640: case 0x0E46: case 0x0EC6: case 0x3005:
|
case 0x0640: case 0x0E46: case 0x0EC6: case 0x3005:
|
||||||
case 0x3031: case 0x3032: case 0x3033: case 0x3034:
|
case 0x3031: case 0x3032: case 0x3033: case 0x3034:
|
||||||
case 0x3035: case 0x309D: case 0x309E: case 0x30FC:
|
case 0x3035: case 0x309D: case 0x309E: case 0x30FC:
|
||||||
case 0x30FE:
|
case 0x30FD: case 0x30FE:
|
||||||
return 1;
|
return 1;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user