Fix incorrect URL encoding

This commit is contained in:
Webifi 2023-09-10 19:03:00 -05:00
parent bbd51f29eb
commit 819faddb38
1 changed files with 2 additions and 2 deletions

View File

@ -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('&')