RE: bug: tidy hould ignore & in hrefs

About the same problem, JTidy transform this code :

<a
href="search.asp?quicksearch=&titre=tintin&auteur=&genre=&editeur=&collectio
n=&tri=ALPHA&source=NEUF&rang=25"><IMG src="../../img/fleches.gif" width="9"
height="13" border="0" alt="suivant"></A>

into :

<a
href="search.asp?quicksearch=&amp;titre=tintin&amp;auteur=&amp;genre=&amp;ed
iteur=&amp;collection=&amp;tri=ALPHA&amp;source=NEUF&rang;=25">
<img src="../../img/fleches.gif" width="9" height="13" border="0"
alt="suivant"></a>

The problem is the end of the HREF : ...NEUF&rang;=25

That should be : ...NEUF&rang=25

This cause a URL that does not work because NEUF&rang;=25 is converted into
NEUF?=25

I suppose the reason why Tidy do this is because &rang is an entity ????

Is there a release that correct this problem ? (I have the 13jan2000
version).

-- 
Denis Queffeulou
Wokup! - Product Team
mailto:denis.queffeulou@wokup.com
http://www.wokup.com

> -----Message d'origine-----
> De: Daniel Biddle [mailto:deltab@osian.net]
> Date: vendredi 4 août 2000 05:46
> À: html-tidy@w3.org
> Objet: Re: bug: tidy hould ignore & in hrefs
> 
> 
> 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 Friday, 4 August 2000 03:41:49 UTC