Re: URI and escape mechanism

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