W3C home > Mailing lists > Public > www-validator@w3.org > February 2005

Re: Ampersands in the HTTP Header

From: Richard Neill <rn214@hermes.cam.ac.uk>
Date: Fri, 25 Feb 2005 03:47:15 +0000
Message-ID: <421E9FC3.7020706@hermes.cam.ac.uk>
To: Olivier Thereaux <ot@w3.org>
CC: Liam Quinn <liam@htmlhelp.com>, www-validator@w3.org

Olivier Thereaux wrote:
> On Fri, Feb 25, 2005, Richard Neill wrote:
>>>"&" should be escaped as "&amp;" in HTML where "&" has a special meaning
>>>(as the start of an entity or character reference).  HTTP headers are not
>>>HTML, and "&" does not have a special meaning in HTTP headers.
>>In that case, may I suggest that the Validator should check for (and 
>>flag as an error) this point.
> It is unclear to me what you mean by "this" in your sentence: are you
> implying that the Markup Validator should check into such HTTP headers
> as Location, find instances of &amp; and report them as errors?
> Checking HTTP compliance is a good idea, but it's completely out of the
> scope of the markup validator.

Yes, that is what I was suggesting. The reason for this, is that the 
validator lays such great stress on the importance of using '&amp;'
instead of '&' in links, and so it only seems natural to do so in an 
HTTP header (which is after all, "just a form of link").

I agree that it's out of scope, but it would be really useful, and this 
must be a common error.


rn214@hermes.cam.ac.uk  **  http://www.richardneill.org
Richard Neill, Trinity College, Cambridge, CB21TQ, U.K.
Received on Friday, 25 February 2005 03:47:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:44 UTC