Use escape instead of encodeURIComponent so that download filenames are encoded correctly (e.g., filenames containing a single quote)

This commit is contained in:
Chris Brown 2016-06-06 15:36:46 +01:00
parent 0dc707ec65
commit dbf1d72d1c

View File

@ -44,7 +44,7 @@ define(function(require, exports, module) {
filename += (paths.length > 1 ? "[+" + (paths.length - 1) + "]" : "") + ".tar.gz";
}
}
var filenameHeader = "attachment; filename*=utf-8''" + encodeURIComponent(filename);
var filenameHeader = "attachment; filename*=utf-8''" + escape(filename);
var process;
req.on("close", function() {