diff --git a/lib/helpers.js b/lib/helpers.js index e532ffd..4c5e192 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -19,7 +19,7 @@ module.exports = function(config){ }, parseJSON: function(str) { - var scopePath = path.join("/", scope) + var scopePath = path.join("/", scope).replace(/\\/g, "/") var rx = RegExp("^" + scopePath, "i") try { @@ -128,11 +128,11 @@ module.exports = function(config){ fullpath = path.join(fullpath, filepath) // add protocol - var fullurl = "https://" + fullpath + var fullurl = "https://" + fullpath.replace(/\\/g, "/") // add querystring if we have one if(obj.hasOwnProperty("query")) fullurl += ("?" + qs.stringify(obj.query)) - + return fullurl }