W3C home > Mailing lists > Public > www-style@w3.org > February 2008

[CSS21] The grammar of url() token

From: Andrei Polushin <polushin@gmail.com>
Date: Thu, 21 Feb 2008 19:07:25 +0600
Message-ID: <47BD778D.3030507@gmail.com>
To: www-style@w3.org

In [CSS21, 4.3.4 URLs and URIs][1]:

> Some characters appearing in an unquoted URI, such as 
> parentheses, commas, whitespace characters, single quotes (') 
> and double quotes ("), must be escaped with a backslash so that 
> the resulting URI value is a URI token: '\(', '\)', '\,'.

### Issue 1 ###

The prose should provide some reasons for escaping ',' with a backslash.
An implementor needs to know the rationale and the intent for that.

### Issue 2 ###

Backslash character itself should be also escaped with an another
backslash, and that fact should be mentioned explicitly.

As a result of the above,

### Issue 3 ###

In [CSS21, G.2 Lexical scanner][2]:

> 	url ([!#$%&*-~]|{nonascii}|{escape})*

This production does not exclude comma or backslash from the range of
characters allowed in unquoted URI. Probably, it should look like:

> 	url ([!#$%&*+\--\[\]-~]|{nonascii}|{escape})*

(not sure, I'm not familiar with Flex).


[1]: http://www.w3.org/TR/2007/CR-CSS21-20070719/syndata.html#uri
[2]: http://www.w3.org/TR/2007/CR-CSS21-20070719/grammar.html#scanner

-- 
Andrei Polushin
Received on Thursday, 21 February 2008 13:07:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:01 GMT