issue with url() in CSS 2.1 grammar

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 UTC