RE: ampersands as literal characters in a URL?

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 UTC