From 819faddb38351bc28ebf482241200baef5c7de48 Mon Sep 17 00:00:00 2001 From: Webifi Date: Sun, 10 Sep 2023 19:03:00 -0500 Subject: [PATCH] Fix incorrect URL encoding --- src/lib/ChatSettingsModal.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ChatSettingsModal.svelte b/src/lib/ChatSettingsModal.svelte index be98ff9..68221d2 100644 --- a/src/lib/ChatSettingsModal.svelte +++ b/src/lib/ChatSettingsModal.svelte @@ -102,8 +102,8 @@ // location.protocol + '//' + location.host + location.pathname const uri = '#/chat/new?petals=true&' + Object.entries(chatSettings).reduce((a, [k, v]) => { const t = typeof v - if (hasChatSetting(k) && (t === 'boolean' || t === 'string' || t === 'number')) { - a.push(encodeURI(k) + '=' + encodeURI(v as any)) + if (hasChatSetting(k as any) && (t === 'boolean' || t === 'string' || t === 'number')) { + a.push(encodeURIComponent(k) + '=' + encodeURIComponent(v as any)) } return a }, [] as string[]).join('&')