diff --git a/index.js b/index.js index 6434fce..c30bd1f 100755 --- a/index.js +++ b/index.js @@ -104,7 +104,9 @@ function render(data, done) { // temporary fix for phantomjs+windows if (/^[a-z]\:\\/i.test(input[0])) { - input[0] = 'file:///' + input[0]; + input[0] = input[0].replace(/\\/g, "/"); + input[0] = 'file://' + input[0]; // three slash!!! + input[0] = encodeURI(input[0]); // for non-Engilish characters and white spaces } outputs.forEach(function(output) {