W3C home > Mailing lists > Public > www-amaya@w3.org > July to September 2009

Re: False parsing error inside href="http://..." !

From: Urs Holzer <urs@andonyar.com>
Date: Mon, 31 Aug 2009 14:05:26 +0200
To: Dominique Mee¨s <dominique@d-meeus.be>
Cc: Helder MagalhŃes <helder.magalhaes@gmail.com>, "www-amaya" <www-amaya@w3.org>
Message-Id: <200908311405.26705.urs@andonyar.com>
Dominique Mee¨s wrote:
> Is it normal to "parse" as html or xml a value inside " " and/or to
> "correct" it?

Yes, entities inside an attribute value must be parsed. Otherwise it 
would not be possible to have a " or a < in an attribute value. 

> Html Tidy does also correct such a & in a URL. I remember that some
> servers do not understand http requests with &amp; instead of &. I
> had to re-correct all my &amp; back to & after using Tidy (I knew
> there were no other & than in URLs). If the correct syntax is
> "http://domain.net/index.php?action=this&lang=fr&something=that" why
> should Amaya or Html Tidy make this impossible?

As far as I know, using & directly instead of &amp; has always been 
wrong in HTML. I do not know why people started using & directly. The 
&amp; never gets sent to a server, since the browser replaces it by & 
when it reads the attribute value. It may be that there are some broken 
user agents which do not replace the &amp;. In this situation you can 
try the following:
Perhaps PHP can handle this syntax, which just uses a semicolon instead 
of &.

Received on Monday, 31 August 2009 12:06:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:30:57 UTC