W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2000

Re: bug: tidy hould ignore & in hrefs

From: Daniel Biddle <deltab@osian.net>
Date: Fri, 4 Aug 2000 03:46:28 +0000 (UTC)
To: html-tidy@w3.org
Message-ID: <Pine.LNX.4.21.0008040335430.20908-100000@charizard.blazingfast.net>
On Thu, 3 Aug 2000, skark wrote:

> <a href="X.ASP?A=1&B=1">AS</a>
> 
> is coverted to
> <a href="X.ASP?A=1&amp;B=1">AS</a>
> 
> tidy hould ignore & in hrefs

No, this is correct. HTML defines the values of href attributes as CDATA:

| <!ATTLIST A
|   href        %URI;          #IMPLIED  -- URI for linked resource --
:
| <!ENTITY % URI "CDATA"
:
| CDATA is a sequence of characters from the document character set and 
| may include character entities.

Character entities are recognised by starting with an ampersand. Any
ampersand that doesn't introduce an entity (such as those in URLs) needs
to be encoded as '&amp;'.

hope this helps,
-- 
Daniel Biddle <deltab@osian.net>
Received on Thursday, 3 August 2000 23:48:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT