misc: encode uri components for post fetching

This commit is contained in:
James Xylight committed 2025-02-09 11:09:52 -08:00
1 parent 8932d00978
commit a94dd5f3d4
6 files changed
+15 -9

No files matched your search

+5 -1
View File
@@ -6,7 +6,11 @@ export function load({ params, url }) {
if (Number(params.instance)) {
const split = url.pathname.split('/')
split.splice(2, 0, `${profile.data.instance?.toLowerCase()}`)
split.splice(
2,
0,
`${encodeURIComponent(profile.data.instance)?.toLowerCase()}`,
)
const newUrl = new URL(url)
newUrl.pathname = split.join('/')