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

pull/315/head
Chris Brown 2016-06-06 15:36:46 +01:00
rodzic 0dc707ec65
commit dbf1d72d1c
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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() {