* Fixed issue [#575](https://github.com/jakubpawlowicz/clean-css/issues/575) - missing directory as a `target`.
* Fixed issue [#577](https://github.com/jakubpawlowicz/clean-css/issues/577) - `background-clip` into shorthand.
* Fixed issue [#579](https://github.com/jakubpawlowicz/clean-css/issues/579) - `background-origin` into shorthand.
+* Fixed issue [#583](https://github.com/jakubpawlowicz/clean-css/issues/583) - URL quoting for SVG data.
[3.2.10 / 2015-05-14](https://github.com/jakubpawlowicz/clean-css/compare/v3.2.9...v3.2.10)
==================
normalize(relative(uri, options));
}
+function quoteFor(url) {
+ if (url.indexOf('\'') > -1)
+ return '"';
+ else if (url.indexOf('"') > -1)
+ return '\'';
+ else
+ return '';
+}
+
function rewriteUrls(data, options, context) {
return reduceUrls(data, context, function (url, tempData) {
url = url.replace(/^(url\()?\s*['"]?|['"]?\s*\)?$/g, '');
- tempData.push('url(' + rebase(url, options) + ')');
+ tempData.push('url(' + quoteFor(url) + rebase(url, options) + quoteFor(url) + ')');
});
}
'@import url(/test/fixtures/partials-relative/base.css);',
'a{background:url(/test/fixtures/partials/extra/down.gif) no-repeat}'
],
+ 'SVG': [
+ "a{background-image:url(\"data:image/svg+xml,<svg version='1.1'/>\")}",
+ "a{background-image:url(\"data:image/svg+xml,<svg version='1.1'/>\")}"
+ ],
'document-local reference': [
'svg{marker-end:url(#arrow)}',
'svg{marker-end:url(#arrow)}'