handle the case of < in quoted attributes, Bastian Kleineidam Daniel

* HTMLparser.c test/HTML/lt.html result/HTML/lt.html*:
  handle the case of < in quoted attributes, Bastian Kleineidam
Daniel
diff --git a/ChangeLog b/ChangeLog
index a21e5bf..ff07a2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Nov  6 23:49:09 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+	* HTMLparser.c test/HTML/lt.html result/HTML/lt.html*:
+	  handle the case of < in quoted attributes, Bastian Kleineidam
+
 Tue Nov  6 16:21:33 CET 2001 Daniel Veillard <daniel@veillard.com>
 
 	* configure.in include/libxml/xmlwin32version.h: releasing 2.4.9
diff --git a/HTMLparser.c b/HTMLparser.c
index da4666c..af941a0 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -1970,7 +1970,8 @@
     /*
      * Ok loop until we reach one of the ending chars
      */
-    while ((CUR != 0) && (CUR != stop) && (CUR != '>')) {
+    while ((CUR != 0) && (CUR != stop)) {
+	if ((stop == 0) && (CUR == '>')) break;
 	if ((stop == 0) && (IS_BLANK(CUR))) break;
         if (CUR == '&') {
 	    if (NXT(1) == '#') {
diff --git a/result/HTML/lt.html b/result/HTML/lt.html
new file mode 100644
index 0000000..90e3c20
--- /dev/null
+++ b/result/HTML/lt.html
@@ -0,0 +1,2 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html><head><meta name="Author" content="Root &lt;root@aol.com&gt;"></head></html>
diff --git a/result/HTML/lt.html.err b/result/HTML/lt.html.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/result/HTML/lt.html.err
diff --git a/result/HTML/lt.html.sax b/result/HTML/lt.html.sax
new file mode 100644
index 0000000..a4ab5e3
--- /dev/null
+++ b/result/HTML/lt.html.sax
@@ -0,0 +1,19 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.startElement(html)
+SAX.ignorableWhitespace(
+, 1)
+SAX.startElement(head)
+SAX.ignorableWhitespace(
+, 1)
+SAX.startElement(meta, name='Author', content='Root &lt;root@aol.com&gt;')
+SAX.endElement(meta)
+SAX.ignorableWhitespace(
+, 1)
+SAX.endElement(head)
+SAX.ignorableWhitespace(
+, 1)
+SAX.endElement(html)
+SAX.ignorableWhitespace(
+, 1)
+SAX.endDocument()
diff --git a/test/HTML/lt.html b/test/HTML/lt.html
new file mode 100644
index 0000000..62f6d94
--- /dev/null
+++ b/test/HTML/lt.html
@@ -0,0 +1,5 @@
+<html>
+<head>
+<meta name="Author" content="Root <root@aol.com>">
+</head>
+</html>