From 8854c4577bd295fc60eae4963bf4af21699dd98f Mon Sep 17 00:00:00 2001 From: Andelf Date: Tue, 30 Aug 2022 21:51:21 +0800 Subject: [PATCH] fix(mobile): wrong urlencode function --- src/main/frontend/config.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/frontend/config.cljs b/src/main/frontend/config.cljs index 1a9c03b05d..ee1f5ebc66 100644 --- a/src/main/frontend/config.cljs +++ b/src/main/frontend/config.cljs @@ -340,11 +340,12 @@ relative-path)] (and (not-empty path) (gp-util/path-normalize path))))) +;; NOTE: js/encodeURIComponent cannot be used here (defn get-page-file-path "Get the path to the page file for the given page. This is used when creating new files." [repo-url sub-dir page-name ext] (let [page-basename (if (mobile-util/native-platform?) - (util/url-encode page-name) + (js/encodeURI page-name) page-name)] (get-file-path repo-url (str sub-dir "/" page-basename "." ext))))