W3C home > Mailing lists > Public > www-validator@w3.org > September 2003

Re: ampersands in hrefs

From: Liam Quinn <liam@htmlhelp.com>
Date: Mon, 8 Sep 2003 23:34:18 -0400 (EDT)
To: "Brad McCormick, Ed.D." <bradmcc@cloud9.net>
Cc: www-validator@w3.org
Message-ID: <Pine.LNX.4.44.0309082313400.16571-100000@localhost.localdomain>

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 &amp; 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 &amp; 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 &amp; 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 &amp; 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 (&sect;) in the URL.

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

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:38 UTC