From 8c914dfe1ff336566ce8b76b4bc29f535ce79a4b Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 19 Aug 2016 10:47:07 +0200 Subject: [PATCH] better filenames --- www/common/cryptpad-common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 4e1eb7f3d..c7a3f146e 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -361,7 +361,8 @@ define([ }; var fixFileName = common.fixFileName = function (filename) { - return filename.replace(/ /g, '-').replace(/\//g, '_'); + return filename.replace(/ /g, '-').replace(/[\/\?]/g, '_') + .replace(/_+/g, '_'); }; var importContent = common.importContent = function (type, f) {