From a536143411dfcf3a154c73fd566dee4ee61e2a4b Mon Sep 17 00:00:00 2001 From: Philipp Spinnler Date: Tue, 15 Jul 2014 15:01:28 +0200 Subject: [PATCH] Check if url is a Data-URL http://en.wikipedia.org/wiki/Data_URI_scheme --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 284a944..a356a9e 100644 --- a/index.js +++ b/index.js @@ -15,6 +15,9 @@ var rebaseUrls = function(css, options) { if (isAbsolute(url) && validator.isURL(url)) { return url; } + if (/^(data:.*;.*,)/.test(url)) { + return url; + } var absolutePath = path.join(options.currentDir, url) var p = path.relative(options.root, absolutePath);