From: Johannes Date: Sun, 6 Nov 2016 14:22:45 +0000 (+0100) Subject: ensure we deal with encoding of paths correctly on the client X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=5f43935e567855125be9ffae1108cb6212cb8d93;hp=94ff5399e8f067a1beef899950c789be64ab36f3;p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git ensure we deal with encoding of paths correctly on the client --- diff --git a/app/js/app.js b/app/js/app.js index f207de6..b26a2a6 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -105,18 +105,18 @@ function loadDirectory(filePath) { } function open(entry) { - var path = encode(sanitize(app.path + '/' + entry.filePath)); + var path = sanitize(app.path + '/' + entry.filePath); if (entry.isDirectory) { window.location.hash = path; return; } - window.open(path); + window.open(encode(path)); } function up() { - window.location.hash = encode(sanitize(app.path.split('/').slice(0, -1).filter(function (p) { return !!p; }).join('/'))); + window.location.hash = sanitize(app.path.split('/').slice(0, -1).filter(function (p) { return !!p; }).join('/')); } function upload() {