summaryrefslogtreecommitdiff
path: root/HTMLparser.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2000-10-03 09:33:21 +0000
committerDaniel Veillard <veillard@src.gnome.org>2000-10-03 09:33:21 +0000
commit970112a91445eee3b5a599452585872298236296 (patch)
tree98feb1d5b7f88324892d5270f264146590e2abf3 /HTMLparser.c
parent740abf5ae7bb78491a031feb501baea43ded7688 (diff)
downloadlibxml2-970112a91445eee3b5a599452585872298236296.tar.gz
Stupid bug fix on the HTML parser:
- HTMLparser.c: Doohhh, attribute name parsing was still case sensitive ! Fixed this ... - result/HTML/* : updated the tests results accordingly Daniel
Diffstat (limited to 'HTMLparser.c')
-rw-r--r--HTMLparser.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/HTMLparser.c b/HTMLparser.c
index cfd0711a..acb13b43 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -142,10 +142,6 @@ PUSH_AND_POP(extern, xmlChar*, name)
#define SKIP_BLANKS htmlSkipBlankChars(ctxt);
-#if 0
-#define CUR ((int) (*ctxt->input->cur))
-#define NEXT htmlNextChar(ctxt);
-#else
/* Inported from XML */
/* #define CUR (ctxt->token ? ctxt->token : (int) (*ctxt->input->cur)) */
@@ -175,7 +171,6 @@ PUSH_AND_POP(extern, xmlChar*, name)
#define COPY_BUF(l,b,i,v) \
if (l == 1) b[i++] = (xmlChar) v; \
else i += xmlCopyChar(l,&b[i],v);
-#endif
/**
* htmlCurrentChar:
@@ -1858,27 +1853,6 @@ htmlParseName(htmlParserCtxtPtr ctxt) {
xmlChar *
htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) {
-#if 0
- xmlChar buf[HTML_MAX_NAMELEN];
- int len = 0;
-
- GROW;
- while ((CUR != 0) && (CUR != stop) && (CUR != '>')) {
- if ((stop == 0) && (IS_BLANK(CUR))) break;
- buf[len++] = CUR;
- NEXT;
- if (len >= HTML_MAX_NAMELEN) {
- fprintf(stderr,
- "htmlParseHTMLAttribute: reached HTML_MAX_NAMELEN limit\n");
- while ((!IS_BLANK(CUR)) && (CUR != '<') &&
- (CUR != '>') &&
- (CUR != '\'') && (CUR != '"'))
- NEXT;
- break;
- }
- }
- return(xmlStrndup(buf, len));
-#else
xmlChar *buffer = NULL;
int buffer_size = 0;
xmlChar *out = NULL;
@@ -1998,7 +1972,6 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) {
}
*out++ = 0;
return(buffer);
-#endif
}
/**
@@ -2620,7 +2593,7 @@ htmlParseAttribute(htmlParserCtxtPtr ctxt, xmlChar **value) {
xmlChar *name, *val = NULL;
*value = NULL;
- name = htmlParseName(ctxt);
+ name = htmlParseHTMLName(ctxt);
if (name == NULL) {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData, "error parsing attribute name\n");