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

issue with url() in CSS 2.1 grammar

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Fri, 27 Jun 2008 13:59:50 +0200
Message-ID: <4864D636.1070307@disruptive-innovations.com>
To: "www-style@w3.org" <www-style@w3.org>

According to CSS 2.1 grammar [1], a |URI| token is formed this way:

   "url("{w}{string}{w}")"   {return URI;}
   "url("{w}{url}{w}")"      {return URI;}

where |url| is

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

Please note the |*| at the end of that line...
That means the following is a perfectly valid CSS 2.1 rule :

   @namespace url();

where the parsing should produce an empty (length 0) url token !

I recommend changing that |*| into a |+|...

[1] http://www.w3.org/TR/CSS21/grammar.html#scanner

</Daniel>
Received on Friday, 27 June 2008 12:00:33 GMT

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