Re: ampersands in hrefs

On Mon, 8 Sep 2003, Brad McCormick, Ed.D. wrote:

> >  ...href="www.foo.com/cgi/test?name=value&name2=value2"
> 
> If I code the ampersands "corectly as & in my URLs, can I count
> on "everybody" doing the right thing?  Are there any
> obscure gottchas?

Way back in 1997, I tested the following browsers and found that they
correctly handled & in HREF values:  Netscape 1.0N, Netscape 1.22,
Netscape 2.02, Netscape 3.04, Netscape 4.04, MSIE 4.0, Opera 3.0b9b,
HotJava 1.1, NCSA Mosaic 3.0, Lynx 2.7, UdiWWW 1.2, and AOLpress 1.2.3.

At that time, the only browser I could find that failed to handle & in
HREF values was Amaya 1.1c Beta.  I later found that gzilla (now called
Dillo) also failed.  I believe that both are long since fixed, although I 
haven't confirmed this myself.

On the other hand, if you don't use & where necessary in HREF values,
Netscape 3.x will sometimes get different URLs than other browsers.  For
example, Netscape 3.x will treat href="foo.cgi?chapter=1&section=2" as if
there were a section sign (§) in the URL.

-- 
Liam Quinn

Received on Monday, 8 September 2003 23:32:30 UTC