W3C home > Mailing lists > Public > www-validator@w3.org > July 2001

Re: DTD 4.01 for ignoring & in CGI URL

From: Jim Correia <correia@barebones.com>
Date: Mon, 23 Jul 2001 12:26:02 -0400
To: www-validator@w3.org
Message-ID: <20010723122603-f01010601-05437956@204.107.232.110>
On 12:14 PM 7/23/01 Nestor Diaz <nestor@engendro.com> wrote:

> I have installed validator on my web site to check my pages to conform
> to the 4.01 standard ( i don't like to use w3 validator due to
> bandwith problems), however i will like to know if i somebody had made
> a patch for 4.01 transitional dtd to not show an error where & is used
> as a separator for a URL, does it exist? i am not a experienced dtd
> programmer.

When used in an HTML attribute, & must be encoded.  If you do not, you
will get unexpected results when using conforming user agents.  Fix your
pages, don't hack the validator to mask your error.

Try the following in a conforming user agent (the trailing ; is
optional, but you are well advised to use it *and* encode your entities,
or else you may get the wrong answer) as the href for an a element:

http://www.foobar.com/sendMail.pl?fred&copy=false

http://www.foobar.com/sendMail.pl?fred&amp;copy=false

Jim
Received on Monday, 23 July 2001 12:26:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:13:59 GMT