clean-css
Advanced tools
Comparing version 3.4.17 to 3.4.18
@@ -0,1 +1,6 @@ | ||
[3.4.18 / 2016-06-15](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.17...v3.4.18) | ||
================== | ||
* Fixed issue [#787](https://github.com/jakubpawlowicz/clean-css/issues/787) - regression in processing data URIs. | ||
[3.4.17 / 2016-06-04](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.16...v3.4.17) | ||
@@ -2,0 +7,0 @@ ================== |
@@ -6,2 +6,4 @@ var split = require('../utils/split'); | ||
var URL_SUFFIX = ')'; | ||
var SINGLE_QUOTE_URL_SUFFIX = '\')'; | ||
var DOUBLE_QUOTE_URL_SUFFIX = '")'; | ||
@@ -35,18 +37,18 @@ var DATA_URI_PREFIX_PATTERN = /^\s*['"]?\s*data:/; | ||
isDataURI = DATA_URI_PREFIX_PATTERN.test(data.substring(nextStart + URL_PREFIX.length)); | ||
if (data[nextStart + URL_PREFIX.length] == '"') { | ||
nextEnd = data.indexOf(DOUBLE_QUOTE_URL_SUFFIX, nextStart); | ||
} else if (data[nextStart + URL_PREFIX.length] == '\'') { | ||
nextEnd = data.indexOf(SINGLE_QUOTE_URL_SUFFIX, nextStart); | ||
} else { | ||
isDataURI = DATA_URI_PREFIX_PATTERN.test(data.substring(nextStart + URL_PREFIX.length)); | ||
if (isDataURI) { | ||
firstMatch = split(data.substring(nextStart), DATA_URI_TRAILER_PATTERN, false, '(', ')', true).pop(); | ||
if (isDataURI) { | ||
firstMatch = split(data.substring(nextStart), DATA_URI_TRAILER_PATTERN, false, '(', ')', true).pop(); | ||
if (firstMatch && firstMatch[firstMatch.length - 1] == URL_SUFFIX) { | ||
nextEnd = nextStart + firstMatch.length - URL_SUFFIX.length; | ||
if (firstMatch && firstMatch[firstMatch.length - 1] == URL_SUFFIX) { | ||
nextEnd = nextStart + firstMatch.length - URL_SUFFIX.length; | ||
} else { | ||
nextEnd = -1; | ||
} | ||
} else { | ||
nextEnd = -1; | ||
} | ||
} else { | ||
if (data[nextStart + URL_PREFIX.length] == '"') { | ||
nextEnd = data.indexOf('"', nextStart + URL_PREFIX.length + 1); | ||
} else if (data[nextStart + URL_PREFIX.length] == '\'') { | ||
nextEnd = data.indexOf('\'', nextStart + URL_PREFIX.length + 1); | ||
} else { | ||
nextEnd = data.indexOf(URL_SUFFIX, nextStart); | ||
@@ -53,0 +55,0 @@ } |
{ | ||
"name": "clean-css", | ||
"version": "3.4.17", | ||
"version": "3.4.18", | ||
"author": "Jakub Pawlowicz <contact@jakubpawlowicz.com> (http://twitter.com/jakubpawlowicz)", | ||
@@ -5,0 +5,0 @@ "description": "A well-tested CSS minifier", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
306051
5892