From 854682f7fcc4c68034b1174f461558840f39a7bf Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 6 Sep 2015 17:36:53 +0100 Subject: Decode URIs --- lib/docx/files.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/docx/files.js b/lib/docx/files.js index 6e6f797..e25d9cc 100644 --- a/lib/docx/files.js +++ b/lib/docx/files.js @@ -23,7 +23,7 @@ var readFile = promises.promisify(fs.readFile.bind(fs)); function uriToPath(uri) { var fileUriPrefix = "file:///"; if (startsWith(uri, fileUriPrefix)) { - return uri.slice(fileUriPrefix.length - 1); + return decodeURIComponent(uri.slice(fileUriPrefix.length - 1)); } else { throw new Error("Could not convert URI to path: " + uri); } -- cgit v1.2.3