Re: Validating CSS on URIs with ampersands

On Thu, Aug 10, 2006 at 10:57:38PM -0500, Edward A. Locke wrote:
> 
> I find that I am able to submit URIs with ampersands to the XHTML
> validator, but not the CSS validator.

> This will be evaluated:
> http://validator.w3.org/check?uri=http%3A%2F%2Fspacestamps.amhosting.com%2Fstamps%2Fissue.php%3Fent%3Dnev%26set%3D1

... which gives a "check [your css] for validity" link ...
 
> This won't:
> http://jigsaw.w3.org/css-validator/validator?uri=http://spacestamps.amhosting.com/stamps/issue.php?ent=nev&set=1

... which doesn't go to that URL, but to:

http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fspacestamps.amhosting.com%2Fstamps%2Fissue.php%3Fent%3Dnev%26set%3D1

Certain characters have special meaning in URLs, and & is one of
them. Since you have an & in your URL and you want to pass it as data,
not as a query string parameter separator you need to URL encoded it.

-- 
David Dorward                                      http://dorward.me.uk

Received on Friday, 11 August 2006 14:04:30 UTC