[Pkg-javascript-commits] [less.js] 06/38: Proposed fix for issue #2360

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:27:24 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.2.0
in repository less.js.

commit 94b37955f179b10eeaaccf1637a5b5f4b97bf432
Author: Matthew Smith <mtscout6 at gmail.com>
Date:   Wed Dec 31 10:42:03 2014 -0700

    Proposed fix for issue #2360
    
    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.
---
 lib/less/tree/url.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/less/tree/url.js b/lib/less/tree/url.js
index 0c87d02..a58a577 100644
--- a/lib/less/tree/url.js
+++ b/lib/less/tree/url.js
@@ -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; });
             }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list