[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev Re: msg00798.html (was: 0x2276 handling) FIXED!
From: |
Leonid Pauzner |
Subject: |
lynx-dev Re: msg00798.html (was: 0x2276 handling) FIXED! |
Date: |
Sat, 2 May 1998 17:05:24 +0400 (MSD) |
> >> The URL is: http://unicorn.us.com/testlynx.html
> >Following recovery issues proposed:
> >
> >(1) translate entities only from correct syntax which ends up with ";",
> > overwise return verbatim (but the BIG TWO?)
> >(2) do (1) only in HREF= (but we got two strings you quoted above
> > displayed differently)
> >(3) do not translate &xyz= which ends up with "=" (no ";" before "=")
> >
> >The last variant looks more preferable.
>
> The last variant is still too general. What might be good is
> a more specific exception, that an '=' is not treated as an implied
> terminator in the specific case of an attribute value which corresponds
> to a URL. That violates SGML principles, but in that specific case an
> '=' not preceded by a ';' is highly unlikely to be intended by the
Not been involved in general code rewriting (which still awaiting
for voluntarist), this prompt fix solve the problem.
diff -u old/lycharut.c ./lycharut.c
--- old/lycharut.c Wed Mar 25 05:58:54 1998
+++ ./lycharut.c Sat May 2 16:50:28 1998
@@ -2213,8 +2213,15 @@
case S_check_name:
/*
** Seek the Unicode value for the named entity.
+ **
+ ** !!!! We manually recover the case of '=' terminator which
+ ** commoly found on query to CGI-scripts
+ ** enclosed as href= URLs like "somepath/?x=1&yz=2"
+ ** Without this dirty fix, submition of such URLs was broken
+ ** if &yz string happend to be a recognized entity name. - LP
*/
- if ((code = HTMLGetEntityUCValue(name)) > 0) {
+ if ( ((code = HTMLGetEntityUCValue(name)) > 0) &&
+ !((cpe == '=') && (stype == st_URL)) ) {
state = S_check_uni;
break;
}
- lynx-dev Re: msg00798.html (was: 0x2276 handling) FIXED!,
Leonid Pauzner <=