Skip to content

Commit

Permalink
Proposed fix for issue #2360
Browse files Browse the repository at this point in the history
I don't entirely understand how the tests are setup, so there are some
failing tests still but they appear to be isolated to base64 encoding
options.
  • Loading branch information
mtscout6 committed Dec 31, 2014
1 parent 0d94e2d commit 94b3795
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/less/tree/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ URL.prototype.eval = function (context) {
if (!this.isEvald) {
// Add the base path if the URL is relative
rootpath = this.currentFileInfo && this.currentFileInfo.rootpath;
if (rootpath && typeof val.value === "string" && context.isPathRelative(val.value)) {
if (rootpath && typeof val.value === "string" && !/^'?data:/.test(val.value) && context.isPathRelative(val.value)) {
if (!val.quote) {
rootpath = rootpath.replace(/[\(\)'"\s]/g, function(match) { return "\\"+match; });
}
Expand Down

0 comments on commit 94b3795

Please sign in to comment.