[xml] [PATCH] HTMLparser doesnt accept '>' in quoted attributes



Hi,

the HTMLparser stops parsing a quoted attribute value on the char '>',
e.g. <meta name="Author" content="Root <root aol com>">

IMHO this is not good, here's a patch:

--- ../libxml2-2.4.9.orig/HTMLparser.c  Tue Oct 30 04:35:05 2001
+++ HTMLparser.c        Tue Nov  6 21:22:12 2001
@@ -1970,7 +1970,7 @@
     /*
      * Ok loop until we reach one of the ending chars
      */
-    while ((CUR != 0) && (CUR != stop) && (CUR != '>')) {
+    while ((CUR != 0) && (CUR != (stop ? stop : '>'))) {
        if ((stop == 0) && (IS_BLANK(CUR))) break;
         if (CUR == '&') {
            if (NXT(1) == '#') {


Greetings, Bastian Kleineidam
[please cc me on replies, I am not on the list]

--
You end up exchanging dozens of e-mails, where you say, "That's bad
because of this and this," and they say, "Oh no, this programming
style is great." Then you have got to teach them a couple of years
of computer science so they can understand why it's crap.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]