W3C home > Mailing lists > Public > www-validator-css@w3.org > June 2012

Re: Bug in url() parsing when url() contains a data URL (data:) without quotes

From: Yves Lafon <ylafon@w3.org>
Date: Mon, 4 Jun 2012 10:47:37 -0400 (EDT)
To: Bert Bos <bert@w3.org>
cc: www-validator-css@w3.org
Message-ID: <alpine.DEB.1.10.1206041044250.31858@wnl.j3.bet>
On Wed, 30 May 2012, Bert Bos wrote:

> The validator seems to try and check the syntax of URLs inside url() to
> some extent. However, it doesn't do that correctly/consistently:
>
> 1) It seems the validator doesn't know about data URLs and gives errors
> for URLs such as this one:
>
> a:before {
> content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQAAAAA3bvkkAAAACklEQVQImWNoAAAAggCByxOyYQAAAABJRU5ErkJggg==)
> }

It's parsed as
( [ "!", "#", "$", "%", "&", "*"-"[", "]"-"~" ] | <NONASCII> | <ESCAPE> )*
So the error is not in the parsing section, but if it doesn't work, then 
it's still a bug :)

>
> 2) It doesn't give the same error when the URLs is quoted. The following
> has the same data URL, but is considered valid:
>
> a:before {
> content:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQAAAAA3bvkkAAAACklEQVQImWNoAAAAggCByxOyYQAAAABJRU5ErkJggg==")
> }
>
>
>
> Bert
>

-- 
Baroula que barouleras, au tiƩu toujou t'entourneras.

         ~~Yves
Received on Monday, 4 June 2012 14:49:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:29 GMT