From d1dd2951cf1d94815276dcef77458fb7c2ab509f Mon Sep 17 00:00:00 2001 From: boypt <1033514+boypt@users.noreply.github.com> Date: Sat, 18 Sep 2021 10:54:11 +0800 Subject: [PATCH] fix: escap filename with special chracters fix #139 --- static/files/js/utils.js | 3 +++ static/files/template/download-tree.html | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/static/files/js/utils.js b/static/files/js/utils.js index c4b4be50..35e8c7c1 100644 --- a/static/files/js/utils.js +++ b/static/files/js/utils.js @@ -198,6 +198,9 @@ app.filter("round", function () { }; }); +app.filter("escape", function () { + return window.encodeURIComponent; +}); app.filter("ratioRound", function () { return function (n) { diff --git a/static/files/template/download-tree.html b/static/files/template/download-tree.html index 0a2b30ce..98059f37 100644 --- a/static/files/template/download-tree.html +++ b/static/files/template/download-tree.html @@ -7,7 +7,7 @@