Re: [BUG/PATCH] ELusive misparsing of quoted strings
Martin Zwickel <[email protected]>
| Newsgroups | gmane.comp.web.elinks.user,gmane.comp.web.links.list |
|---|---|
| Organization | TechnoTrend AG |
| Message-ID | <[email protected]> |
On Wed, 23 Jul 2003 04:31:49 +0200 Petr Baudis <[email protected]> bubbled: > Dear diary, on Tue, Apr 22, 2003 at 09:42:19AM CEST, I got a letter, > where Martin Zwickel <[email protected]> told me, that... > > Hi there! > > Hi, > > > the tag: > > <a href="e" onmouseover="document.title='hast mich!';">hallo2</a> > > doesn't work with ELusive's html parser. > > > > the patch: > > --- a/elusive/parser/html/parser.c 2003-04-09 13:03:39.000000000 +0200 > > +++ b/elusive/parser/html/parser.c 2003-04-17 10:24:33.000000000 +0200 > > @@ -494,8 +485,17 @@ > > attr = html, attr_len = html_len; > > > > while (html_len) { > > - if ((!WHITECHAR(*html) && *html != '>') > > - && (!quoted || (quoted && *html != quoted))) { > > + if(quoted) > > + { > > + if(*html!=quoted) > > + { > > + html++, html_len--; > > + continue; > > + } > > + } > > + else > > + if (!WHITECHAR(*html) && *html != '>') > > + { > > html++, html_len--; > > continue; > > } > > Even after staring at this for quite a long time, I can't see how is the new > version non-equivalent to the old one. Could you please unblock me? > hmm, strange patch ;) was long ago. i know that there was a problem with the parsing and this patch fixed it. i think it's the same as: if ((!quoted && (!WHITECHAR(*html) && *html != '>')) || (quoted && (*html != quoted))) so there is a little difference... in the old behaviour: if it was not quoted, it was ok, but if it's quoted, it also has to be (!WHITECHAR(*html) && *html != '>'), because of the &&. my patch removed the dep to this and it worked much better. Regards, Martin -- MyExcuse: Electrical conduits in machine room are melting. Martin Zwickel <[email protected]> Research & Development TechnoTrend AG <http://www.technotrend.de>
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/HipUmjLYGS7fcG0RAt1dAJ47Uf/6Lxt9BkqLOB7h3oN2/5CDIACdF2kq Zo92LU6yemGWd/qrAl3UrMk= =igP8 -----END PGP SIGNATURE-----