From b5db99884aad0a7917d5e30cd3c3b0c97e83837e Mon Sep 17 00:00:00 2001 From: Nicholas Jitkoff Date: Mon, 20 Jun 2022 07:54:54 -0700 Subject: [PATCH] Encode spaces in description --- docs/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.js b/docs/index.js index 14e8ddc..efb43e9 100644 --- a/docs/index.js +++ b/docs/index.js @@ -118,7 +118,7 @@ if (e.data.themeColor) setThemeColor(e.data.themeColor); if (e.data.updateURL) { let path = ["/" + e.data.title.replace(/\s/g, "-")]; - if (e.data.description) path.push("d/" + encodeURIComponent(e.data.description)); + if (e.data.description) path.push("d/" + encodeURIComponent(e.data.description.replace(/\s/g, "-")); if (e.data.favicon) path.push("f/" + encodeURIComponent(e.data.favicon)); if (e.data.image) path.push("i/" + encodeURIComponent(btoa(e.data.image))); window.location.pathname = path.join('/') + "/";