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

Invalid css generated with inline data url containing ) #464

Closed
andreialecu opened this issue Feb 17, 2015 · 5 comments
Closed

Invalid css generated with inline data url containing ) #464

andreialecu opened this issue Feb 17, 2015 · 5 comments
Labels

Comments

@andreialecu
Copy link

I'm trying to minify https://github.com/stevermeister/ngWig/blob/master/dist/css/ng-wig.css#L134 as part of a custom build step in my project.

There are several data urls in that file of type text/xml which contain an inner ) in them.

clean-css strips the enclosing parens quotes so the line gets transformed from url('...)...') to url(...)...) resulting in a broken file.

@jakubpawlowicz
Copy link
Collaborator

@andreialecu Sth is wrong indeed. Will take a look!

@andreialecu
Copy link
Author

Meant enclosing quotes not parens. That makes more sense as to what the problem is. :)

@jakubpawlowicz
Copy link
Collaborator

@andreialecu May I know how you use clean-css? Via CLI, API, or a plugin? I have a fix but not a very straightforward one so it may land in master aka 3.2.0-pre instead.

jakubpawlowicz added a commit that referenced this issue Mar 3, 2015
It was properly handled in URL processor but not URL rewriter.

This fix extracts a UrlScanner class with algorithm from URL processor
and reuses it in URL rewriter.

Technically it should be a fix not such a "major" refactor, but bending
the rules shouldn't hurt :-).
@andreialecu
Copy link
Author

I was using the grunt plugin. Thanks!

@jakubpawlowicz
Copy link
Collaborator

👍 It's in the latest 3.1.x too.

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

No branches or pull requests

2 participants