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

url() and comment: Freeze with 100% CPU load #308

Closed
molily opened this issue Jun 30, 2014 · 3 comments
Closed

url() and comment: Freeze with 100% CPU load #308

molily opened this issue Jun 30, 2014 · 3 comments

Comments

@molily
Copy link

molily commented Jun 30, 2014


$ cleancss -v
2.2.5

test.css:

p {
  background-image: url('/*');
}

/* */
$ cleancss test.css

Freezes with 100% CPU. Can someone reproduce this? I guess this is a bug in parsing of comments.

My actual CSS doesn’t look like the contrived example above, that’s just a minimal test case to reproduce the freeze for me. What I actually have looks like this:

.some-selector {
  background-image: url('<t4 type="media" id="123456" formatter="path/*"/>');
}

/* Some comment */
.another-rule {}

This XML tag is a marker for the CMS we’re using. The CMS replaces the tag with the actual media URL.

I know that’s funky but it’s valid from a CSS syntax point of view, isn’t it? So clean-css shouldn’t choke on it.

Thanks!

@GoalSmashers
Copy link
Contributor

Well, it freezes indeed! Fix is coming...

@GoalSmashers
Copy link
Contributor

It's fixed in 2.2.6. Little bit more tricky than I thought!

@molily
Copy link
Author

molily commented Jul 6, 2014

Thanks a lot!

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

2 participants