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

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:
http://domain.net/index.php?action=this;lang=fr;something=that
Perhaps PHP can handle this syntax, which just uses a semicolon instead 
of &.

Greetings
Urs

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