W3C home > Mailing lists > Public > uri@w3.org > May 2002

Good/Bad - URI encoding in HTML editor

From: Karl Dubost <karl@w3.org>
Date: Tue, 21 May 2002 13:21:59 -0400
Message-Id: <p0511171db9102c416b1b@[24.201.26.36]>
To: uri@w3.org
Topic: About encoding reserved characters in the query part of an URL.

Hi,

I'm dealing with a bug report of BBedit - Barebones Software, which 
is an HTML editor. [1]

The question is that BBedit has a mechanism to automatically 
translate the URIs in a document when it's inside an href.

+ For example when you have typed
	<a href="http://www.example.org/foo?toto=3&tata=4">A request</a>

BBedit will convert it to
	<a href="http://www.example.org/foo?toto=3&tata=4">A request</a>


+ But if you have typed
	<a 
href="http://www.example.org/foo?http://www.example.net/path/index.html">A 
request</a>

BBedit is complaining with the message:
Value of attribute "href" for element "<a>" is invalid; URL path 
needs encoding ("/foo?http: 
%2F%2Fwww.example.net%2Fpath%2Findex.html").


The RFC 2396 [2] says:

[...]
<scheme>://<authority><path>?<query>
[...]

3.4. Query Component

    The query component is a string of information to be interpreted by
    the resource.

       query         = *uric

    Within a query component, the characters ";", "/", "?", ":", "@",
    "&", "=", "+", ",", and "$" are reserved.


So my question is do the slahes MUST be or not encoded in a query 
part of an URL?


[1] http://www.barebones.com/
[2] http://www.ietf.org/rfc/rfc2396.txt
-- 
Karl Dubost / W3C - Conformance Manager
           http://www.w3.org/QA/

      --- Be Strict To Be Cool! ---
Received on Tuesday, 21 May 2002 13:23:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:30 GMT