Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clean-css

Package Overview
Dependencies
Maintainers
2
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clean-css - npm Package Compare versions

Comparing version 3.4.17 to 3.4.18

5

History.md

@@ -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 @@ ==================

28

lib/urls/reduce.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc