W3C home > Mailing lists > Public > www-validator@w3.org > October 2010

Re: [VE][403] Add Subject Here

From: Philip Taylor (Webmaster, Ret'd) <P.Taylor@Rhul.Ac.Uk>
Date: Mon, 04 Oct 2010 11:30:47 +0100
Message-ID: <4CA9ACD7.2020501@Rhul.Ac.Uk>
To: David Dorward <david@dorward.me.uk>
CC: W3C Validator Community <www-validator@w3.org>


David Dorward wrote:

> You would use % notation if you wanted a literal
> & in the URL (as opposed to a separator between a value and the next key of the
> question string).
>
> Since you want a separator, you just need to represent the URL in HTML, so use
> &amp;
>
> This is described in the explanation of error message that appears under the
> error in the validator's report

OK, that what was I thought, but it was rather early in the morning
and my brain was not yet fully engaged.  But it might be worth exploring
further what exactly happens with all three possibilities.  The page

	http://web-consultants.org.uk/sites/tests/Ampersands.html

contains all three, plus three additional exploratory tests.
Would you agree that the following occur :

1) No special treatment.  The browser sends an unescaped ampersand,
the server /should/ treat it as the start of a shortref, but Google
elects not to and treats it as if it were escaped.

2) The browser sends &amp; which the server correctly interprets as &.

3) The browser sends %26, which the server interprets as a part of
the parameter to "hl", as in "hl=en&q=ampersands+in+urls"; since
this is not an expected value for "hl", the server redirects to
http://www.google.co.uk/webhp. This last hypothesis is investigated
in (4), where %26 is used as the parameter to "q", (5), where the
parameter to "hl" is "en", and (6), where the parameter to "hl" is
"enqampersands+in+urls".

Philip Taylor
Received on Monday, 4 October 2010 10:31:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:44 GMT