From dbf1d72d1c3bacdf85feaa9abb5eaeed86149fbe Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Mon, 6 Jun 2016 15:36:46 +0100 Subject: [PATCH] Use escape instead of encodeURIComponent so that download filenames are encoded correctly (e.g., filenames containing a single quote) --- plugins/c9.vfs.server/download.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/c9.vfs.server/download.js b/plugins/c9.vfs.server/download.js index ec26e2ca..c064dce6 100644 --- a/plugins/c9.vfs.server/download.js +++ b/plugins/c9.vfs.server/download.js @@ -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() {