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

Re: URI and escape mechanism

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 11 Jul 2002 06:45:11 +0200
To: Karl Dubost <karl@w3.org>
Cc: www-validator@w3.org
Message-ID: <i01qiuof0kt3ip27rclhcb03vuf4bee0i1@4ax.com>

* Karl Dubost wrote:
>Question:

I suppose you mean

<a href='

>http://www.example.org/check?uri=http://www.example.net/path/to/yourfile.html&lang=en

'>...</a>

>If we escape "&" only the validator will be fine...

The validator will also be fine if you do not escape the ampersand in
this case, because the &lang is interpreted as entity reference and
thus as a left-pointing angle bracket instead of an ampersand followed
by "lang". If you escape the ampersand in the HTML representation of
that URI, this won't happen.

>Except that the validator on port 8001 have all ok... hmmm not good.

The validator will only complain if there is "no such entity".

>but the RFC seems to say you have to escape also the "/"

No, I explained this in [1] in detail. You only have to escape the '/'
if the '/' has a special meaning for <http://www.example.org/check> and
you only have to do it in order to ensure correct interpretation of the
URI, not in order to make it syntactically valid.

[1] http://w3.org/2002/02/mid/uueteuogcp859t4bc2l4jq8pqk5dv4n6so@4ax.com
Received on Thursday, 11 July 2002 00:45:41 GMT

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