W3C home > Mailing lists > Public > www-html@w3.org > September 2001

RE: ampersands as literal characters in a URL?

From: Clover Andrew <aclover@1value.com>
Date: Fri, 28 Sep 2001 12:53:48 +0200
Message-ID: <D58B0195B58937489E89124469E57CA249D97E@EX1.1value.com>
To: <www-html@w3.org>
Tony Rees <Tony.Rees@csiro.au> wrote:

> My PL/SQL procedures return an Oracle error message
> (OWS-05101: Execution failed due to Oracle error -6550)
> when I attempt to replace the ampersand in a URL with
> either &#38; or &amp;.

I don't think this is an HTML problem... all current browsers will send
*exactly* the same request to your server whether you have escaped the
ampersands or forgotten to. (Assuming you haven't accidentally given one
of your variables the name of an entity, in which case the non-escaped
version will break.)

I may be able to help if you can point me to a misbehaving page (though
authoring problems are OT on this list really).

> Neither does it work when I try the hex equivalent, %26.

This is correct - using %26 takes away the special meaning of '&', so
that you can put an ampersand in a field value. eg.
food=fish%26chips&drink=dandelion%26burdock.

> So, if (as it appears) [...] the ampersands cannot be
> replaced with anything else which will work with the
> CGI or PL/SQL scripts

This isn't the case; something else is going wrong.

> isn't there a case for the HTML spec to be modified to
> permit the use of ampersands within the <A HREF></A>
> tags?

But then how would you include a " character in an attribute value? :-)

-- 
Andrew Clover
Technical Consultant
1VALUE.com AG
Received on Friday, 28 September 2001 06:57:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:49 GMT