Re: Amaya mishandling HREF values that contain ampersand

On Tue, Jul 06, 1999 at 02:27:05PM +0100, E.E. Mellor wrote:
> > Surely, in a URL an ampersand is escaped as %26 ?
> 
>   B.2.2 Ampersands in URI attribute values  
>    
>    The URI that is constructed when a form is submitted may be used as an
>    anchor-style link (e.g., the href attribute for the A element).
>    Unfortunately, the use of the "&" character to separate form fields 
>    interacts with its use in SGML attribute values to delimit character
>    entity references. For example, to use the URI "http://host/?x=1&y=2"
>    as a linking URI, it must be written <A
>    href="http://host/?x=1&#38;y=2"> or <A 
>    href="http://host/?x=1&amp;y=2">.
>    
>    We recommend that HTTP server implementors, and in particular, CGI
>    implementors support the use of ";" in place of "&" to save authors
>    the trouble of escaping "&" characters in this manner.
>   
>      -- HTML 4.0 Specification.

This seems like a rather unfortunate design oversight in the HTML 4.0
specification.  Using %26 is preferable because it doesn't rely on
browsers correctly converting &amp; back to an ampersand, and the
admonishment to replace the use of ampersand with semicolon in CGIs
seems difficult to achieve without breaking compatibility with the
urlencoding format for HTML forms!  Can anyone find records of these
issues being addressed during the HTML 4 specification process?

Cheers,
	Andrew
-- 
mailto:xanni@xanadu.net                         Andrew Pam
http://www.xanadu.com.au/                       Chief Scientist, Xanadu
http://www.glasswings.com.au/                   Technical Editor, Glass Wings
http://www.sericyb.com.au/sc/                   Manager, Serious Cybernetics
P.O. Box 26, East Melbourne VIC 8002 Australia  Phone +61 3 9419-2989

Received on Tuesday, 6 July 1999 10:03:24 UTC