Re: [VE][403] Add Subject Here

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
> &
>
> 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 & 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 UTC