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

Ampersands in URLs: Validator conflicts with RFC2396?

From: Maarten de Boer <mdeboer@iua.upf.es>
Date: Wed, 23 Oct 2002 10:43:23 -0400 (EDT)
To: liam@htmlhelp.com, www-validator@w3.org, gerald@w3.org
Cc: sogm@kmt.hku.nl
Message-Id: <20021023163917.02815b51.mdeboer@iua.upf.es>




Hello,

The w3c validator tells me about the invalid use of an & in a
URI, just as described in the FAQ.

http://www.htmlhelp.com/tools/validator/problems.html#amp

However, I find this explanation rather dubious, when I compare it
to the "Uniform Resource Identifiers (URI): Generic Syntax" RFC2396

http://www.ietf.org/rfc/rfc2396.txt

(refered to by the w3c html 4.01 reference, 
http://www.w3.org/TR/html401/references.html )

which says:

2.2. Reserved Characters

   Many URI include components consisting of or delimited by, certain
   special characters.  These characters are called "reserved", since
   their usage within the URI component is limited to their reserved
   purpose.  If the data for a URI component would conflict with the
   reserved purpose, then the conflicting data must be escaped before
   forming the URI.

      reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
                    "$" | ","

   The "reserved" syntax class above refers to those characters that are
   allowed within a URI, but which may not be allowed within a
   particular component of the generic URI syntax; they are used as
   delimiters of the components described in Section 3.

   Characters in the "reserved" set are not reserved in all contexts.
   The set of characters actually reserved within any given URI
   component is defined by that component. In general, a character is
   reserved if the semantics of the URI changes if the character is
   replaced with its escaped US-ASCII encoding.

I understand that this means that the & is a reserved character in URI's
and that it's "usage within the URI component is limited to their reserved
purpose.", which in the case of the & is seperating parameters, and not
starting an entity!

I hope you will agree with me on the matter (also because I am about to
bet a huge amount of beer on it with a friend on mine how seems to disagree)
or explain to me how I am interpreting the RFC incorrectly. Please answer
me offlist - I am not subscribed.

Kind regards,

Maarten
Received on Wednesday, 23 October 2002 20:04:11 GMT

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