diff --git a/lib/XMLHttpRequest.js b/lib/XMLHttpRequest.js index 4893913..cd173fd 100644 --- a/lib/XMLHttpRequest.js +++ b/lib/XMLHttpRequest.js @@ -306,7 +306,7 @@ exports.XMLHttpRequest = function() { } if (settings.async) { - fs.readFile(url.pathname, "utf8", function(error, data) { + fs.readFile(unescape(url.pathname), "utf8", function(error, data) { if (error) { self.handleError(error); } else { @@ -317,7 +317,7 @@ exports.XMLHttpRequest = function() { }); } else { try { - this.responseText = fs.readFileSync(url.pathname, "utf8"); + this.responseText = fs.readFileSync(unescape(url.pathname), "utf8"); this.status = 200; setState(self.DONE); } catch(e) {