From aae82dca6f18eab4ffb602c2ca195ddcde061c30 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sun, 13 Nov 2022 23:01:56 -0800 Subject: [PATCH] file name escape uri fix https://github.com/seaweedfs/seaweedfs/issues/3969 --- weed/server/filer_ui/filer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/server/filer_ui/filer.html b/weed/server/filer_ui/filer.html index 2369f8e87..ef9ef75fb 100644 --- a/weed/server/filer_ui/filer.html +++ b/weed/server/filer_ui/filer.html @@ -319,7 +319,7 @@ if (!baseUrl.endsWith('/')) { baseUrl += '/'; } - var url = baseUrl + dirName; + var url = baseUrl + encodeURIComponent(dirName); if (!url.endsWith('/')) { url += '/'; } @@ -335,7 +335,7 @@ if (newName == null || newName == '') { return; } - var url = basePath + newName; + var url = basePath + encodeURIComponent(newName); var originPath = basePath + originName; url += '?mv.from=' + originPath; var xhr = new XMLHttpRequest();