"onfocus",
"onblur",
"onsubmit",
- "onreset",
+ "onrest",
"onchange",
"onselect"
};
int i;
int discardtag = 0;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
if ((ctxt == NULL) || (ctxt->input == NULL)) {
htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
"htmlParseStartTag: context error\n", NULL, NULL);
return -1;
}
- if (ctxt->instate == XML_PARSER_EOF)
- return(-1);
if (CUR != '<') return -1;
NEXT;
htmlParseElementInternal(htmlParserCtxtPtr ctxt) {
const xmlChar *name;
const htmlElemDesc * info;
- htmlParserNodeInfo node_info = { 0, };
+ htmlParserNodeInfo node_info;
int failed;
if ((ctxt == NULL) || (ctxt->input == NULL)) {
ctxt->sax->endDocument(ctxt->userData);
}
}
- if ((!(ctxt->options & HTML_PARSE_NODEFDTD)) && (ctxt->myDoc != NULL) &&
+ if ((ctxt->myDoc != NULL) &&
((terminate) || (ctxt->instate == XML_PARSER_EOF) ||
(ctxt->instate == XML_PARSER_EPILOG))) {
xmlDtdPtr dtd;
/* set encoding */
if (encoding) {
- size_t l = strlen(encoding);
-
- if (l < 1000) {
- content = xmlMallocAtomic (xmlStrlen(content_line) + l + 1);
- if (content) {
- strcpy ((char *)content, (char *)content_line);
- strcat ((char *)content, (char *)encoding);
- htmlCheckEncoding (ctxt, content);
- xmlFree (content);
- }
+ content = xmlMallocAtomic (xmlStrlen(content_line) + strlen(encoding) + 1);
+ if (content) {
+ strcpy ((char *)content, (char *)content_line);
+ strcat ((char *)content, (char *)encoding);
+ htmlCheckEncoding (ctxt, content);
+ xmlFree (content);
}
}
if (fd < 0)
return (NULL);
- xmlInitParser();
xmlInitParser();
input = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE);
return (NULL);
if (ctxt == NULL)
return (NULL);
- xmlInitParser();
htmlCtxtReset(ctxt);
return (NULL);
if (ctxt == NULL)
return (NULL);
- xmlInitParser();
htmlCtxtReset(ctxt);
return (NULL);
if (buffer == NULL)
return (NULL);
- xmlInitParser();
htmlCtxtReset(ctxt);
return (NULL);
if (ctxt == NULL)
return (NULL);
- xmlInitParser();
htmlCtxtReset(ctxt);
return (NULL);
if (ctxt == NULL)
return (NULL);
- xmlInitParser();
htmlCtxtReset(ctxt);