[Top][All Lists]

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

LYNX-DEV Escaping ampersands (was: Possible lynx bug)

From: Klaus Weide
Subject: LYNX-DEV Escaping ampersands (was: Possible lynx bug)
Date: Fri, 7 Mar 1997 18:30:26 -0600 (CST)

On Fri, 7 Mar 1997, Wayne Buttles wrote:
> On Fri, 7 Mar 1997, Christopher R. Maden wrote:
> >    Linkname: [LINK]
> >    Filename:
> >          AT-CatalogIndexsearch.cgi?doc=d60&searchpage=
> >          /catalog/search.html
> The problem is with the & in the URL.  It is supposed to be translated
> into %26 to be legal.  Lynx2.6 may have been strict on this and 2.7 was
> made lax to compensate for bad URLs.  I am basing this on memory, but I
> believe this is all correct.

No it isn't.  A '&' which is a separator between fields is not 
URL-encoded (i.e. not transmitted as '%26').
A '&' which is part of the text of a field is URL-escaped.  That's how it
is possible to enter '&' characters in input (textarea etc.) form fields.
Turn TRACE mode on, then submit a query for "Perl & bat" to see the

A problem with having such links (e.g. in HREF attribute values) in HTML
documents is that the '&' really would have to be SGML-escaped
(written as '&') to do it properly.  Lynx of course recognizes the
correct as well as the (usual) incorrect usage.  Conflicts only
arise if the field name in a search string coincides with the name of
an HTML character entity.  (Not likely that there ever will be an
entity '&searchpage;'.  Not so sure about '&sp;'.)  But that's a whole
different topic.


; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]