[elinks-users] Re: [BUG/PATCH] ELusive misparsing of quoted strings

Petr Baudis pasky at ucw.cz
Tue Jul 22 19:31:49 PDT 2003


Dear diary, on Tue, Apr 22, 2003 at 09:42:19AM CEST, I got a letter,
where Martin Zwickel <martin.zwickel at technotrend.de> 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?

-- 
 
				Petr "Pasky" Baudis
.
Perfection is reached, not when there is no longer anything to add, but when
there is no longer anything to take away.
	-- Antoine de Saint-Exupery
.
Stuff: http://pasky.ji.cz/
-- 
Unsubscribe: send email to elinks-users-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the elinks-users mailing list