We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 68dc12c + ea9808f commit 3c70036Copy full SHA for 3c70036
2 files changed
lib/utils.js
@@ -12,6 +12,7 @@ var path = require('path');
12
var S = require('string');
13
14
function uriToFilename(uri, base) {
15
+ uri = decodeURIComponent(uri)
16
var filename = path.join(base, uri);
17
// Make sure filename ends with '/' if filename exists and is a directory.
18
// TODO this sync operation can be avoided and can be left
test/utils.js
@@ -20,5 +20,9 @@ describe('Utility functions', function() {
20
it('should return empty as relative path for undefined path', function() {
21
assert.equal(utils.pathBasename(undefined), '');
22
});
23
+
24
+ it('should properly decode a uri', function() {
25
+ assert.equal(utils.uriToFilename('uri%20', 'base/'), 'base/uri ')
26
+ });
27
28
0 commit comments