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@[]>
To: uri@w3.org
Topic: About encoding reserved characters in the query part of an URL.


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

BBedit is complaining with the message:
Value of attribute "href" for element "<a>" is invalid; URL path 
needs encoding ("/foo?http: 

The RFC 2396 [2] says:


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

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:04 UTC