* Adds missing `@import` processing to our benchmark (run via `npm run bench`).
* Fixed issue [#157](https://github.com/GoalSmashers/clean-css/issues/157) - gets rid of `removeEmpty` option.
* Fixed issue [#159](https://github.com/GoalSmashers/clean-css/issues/159) - escaped quotes inside content.
+* Fixed issue [#162](https://github.com/GoalSmashers/clean-css/issues/162) - strip quotes from base64 encoded URLs.
1.1.7 / 2013-10-28
==================
// strip parentheses in urls if possible (no spaces inside)
replace(/url\((['"])([^\)]+)['"]\)/g, function(match, quote, url) {
- if (url.match(/[ \t]/g) !== null || url.indexOf('data:') === 0)
+ var unsafeDataURI = url.indexOf('data:') === 0 && url.match(/data:\w+\/[^;]+;base64,/) === null;
+ if (url.match(/[ \t]/g) !== null || unsafeDataURI)
return 'url(' + quote + url + quote + ')';
else
return 'url(' + url + ')';
}),
'urls': cssContext({
'keep urls without parentheses unchanged': 'a{background:url(/images/blank.png) 0 0 no-repeat}',
- 'keep urls with data URI unchanged': ".icon-logo{background-image:url('data:image/svg+xml;charset=US-ASCII')}",
+ 'keep non-encoded data URI unchanged': ".icon-logo{background-image:url('data:image/svg+xml;charset=US-ASCII')}",
+ 'strip quotes from base64 encoded PNG data URI': [
+ ".icon-logo{background-image:url('data:image/png;base64,iVBORw0')}",
+ ".icon-logo{background-image:url(data:image/png;base64,iVBORw0)}"
+ ],
+ 'strip quotes from base64 encoded ICO data URI': [
+ '.icon-logo{background-image:url("data:image/x-icon;base64,AAABAAEAEBA")}',
+ '.icon-logo{background-image:url(data:image/x-icon;base64,AAABAAEAEBA)}'
+ ],
'strip single parentheses': [
"a{background:url('/images/blank.png') 0 0 no-repeat}",
"a{background:url(/images/blank.png) 0 0 no-repeat}"