* Requires Node.js 4.0+ to run.
+[3.4.8 / 2015-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.7...3.4)
+==================
+
+* Fixed issue [#676](https://github.com/jakubpawlowicz/clean-css/issues/676) - fuzzy matching unqoted data URIs.
+
[3.4.7 / 2015-11-10](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.6...v3.4.7)
==================
// this is a fuzzy matching logic for unqoted data URIs
while (true) {
nextEndAhead = data.indexOf(URL_SUFFIX, nextEnd + 1);
- // if it has whitespace then we should be out of URL, otherwise keep iterating
- // if it has not but content is not escaped, it has to be quoted so it will be captured
- // by either of two clauses above
- if (nextEndAhead == -1 || /\s/.test(data.substring(nextEnd, nextEndAhead)))
+ // if it has whitespace, curly braces, or semicolon then we should be out of URL,
+ // otherwise keep iterating if it has not but content is not escaped,
+ // it has to be quoted so it will be captured by either of two clauses above
+ if (nextEndAhead == -1 || /[\s\{\};]/.test(data.substring(nextEnd, nextEndAhead)))
break;
nextEnd = nextEndAhead;
'document-local reference': [
'svg{marker-end:url(#arrow)}',
'svg{marker-end:url(#arrow)}'
+ ],
+ 'quoting URLs #1': [
+ 'div{background:url("data:image/svg+xml;base64,==")}li:nth-child(odd){color:red}',
+ 'div{background:url(data:image/svg+xml;base64,==)}li:nth-child(odd){color:red}'
+ ],
+ 'quoting URLs #2': [
+ 'div{background:url("data:image/svg+xml;base64,==");border-image:url(1.png)}li:nth-child(odd){color:red}',
+ 'div{background:url(data:image/svg+xml;base64,==);border-image:url(test/fixtures/partials-relative/1.png)}li:nth-child(odd){color:red}'
]
}, {
target: process.cwd(),