Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unquoted data URIs are valid #42

Closed
tcrxt opened this issue Nov 10, 2015 · 4 comments
Closed

Unquoted data URIs are valid #42

tcrxt opened this issue Nov 10, 2015 · 4 comments

Comments

@tcrxt
Copy link

tcrxt commented Nov 10, 2015

This issue is explained at http://stackoverflow.com/q/15481088/2657549

#something {
    background: url(data:image/png;base64,ABCDEF);
}

with a correct base64 encoding of an image instead of ABCDEF is valid according to http://www.w3.org/TR/CSS21/syndata.html#uri but throws an error when going through the validator:

 Value Error : background url(data:image/png;base64,ABCDEF) is an incorrect URL url(data:image/png;base64,ABCDEF) 

Is that a bug?

@ylafon
Copy link
Member

ylafon commented Nov 10, 2015

The issue is on the URL parsing. I basically need to write a custom one for data:

@ylafon
Copy link
Member

ylafon commented May 11, 2016

I am closing this issue for now, there may be another one to ensure the validity of the URL, but it is a CSS checker, not a URL one...

@ylafon ylafon closed this as completed May 11, 2016
@sideshowbarker
Copy link
Contributor

You might be able to just Galimatias, the Java-based URL-parsing library the Nu HTML Checker uses.

@ylafon
Copy link
Member

ylafon commented May 12, 2016

Thanks @sideshowbarker the URL handling in the CSS validator needs a major rewrite (that is not the only part...), so such a library would be much welcomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants