From 544bd17a1d4dfdebe3e3c2316a11172bd256cea7 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 6 Dec 2024 16:10:24 +0200 Subject: [PATCH] web/util: decode fragment parts in matrix URIs --- web/src/util/validation.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/util/validation.ts b/web/src/util/validation.ts index 8554282..187753b 100644 --- a/web/src/util/validation.ts +++ b/web/src/util/validation.ts @@ -63,13 +63,13 @@ export function parseMatrixURI(uri: unknown): ParsedMatrixURI | undefined { params: parsed.searchParams, } if (type === "u") { - output.identifier = `@${ident1}` + output.identifier = `@${decodeURIComponent(ident1)}` } else if (type === "r") { - output.identifier = `#${ident1}` + output.identifier = `#${decodeURIComponent(ident1)}` } else if (type === "roomid") { - output.identifier = `!${ident1}` + output.identifier = `!${decodeURIComponent(ident1)}` if (subtype === "e") { - output.eventID = `$${ident2}` + output.eventID = `$${decodeURIComponent(ident2)}` } } else { return