Re: ampersands as literal characters in a URL?

* Tony.Rees@csiro.au wrote:
>Maybe somebody can help me. I have some HTML documents which I am trying to
>validate against HTML 4.01 using the HTML validator on the W3 site. I can
>resolve all problems apart from the use of the ampersand character (&)
>within a URL where it performs a function to concatenate parameters which
>are being sent to a CGI script or (in my case) an Oracle PL/SQL procedure.

You have to distinguish between URIs and attribute values,
<a href='script?a=1&amp;b=2'>...</a> really works on almost
all browsers. The URI is still script?a=1&b=2 but with
characters that must be escaped escaped. Not escaping the
ampersand may cause major problems.
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/

Received on Friday, 28 September 2001 09:08:26 UTC