diff --git a/src/open/clients/Element.js b/src/open/clients/Element.js index 0d54946..8317e29 100644 --- a/src/open/clients/Element.js +++ b/src/open/clients/Element.js @@ -72,11 +72,11 @@ export class Element { if (isWebPlatform && trustedWebInstances.includes(link.webInstances[this.id])) { instanceHost = link.webInstances[this.id]; } - return `https://${instanceHost}/#/${fragmentPath}`; + return `https://${instanceHost}/#/${encodeURIComponent(fragmentPath)}`; } else if (platform === Platform.Linux || platform === Platform.Windows || platform === Platform.macOS) { - return `element://vector/webapp/#/${fragmentPath}`; + return `element://vector/webapp/#/${encodeURIComponent(fragmentPath)}`; } else { - return `element://${fragmentPath}`; + return `element://${encodeURIComponent(fragmentPath)}`; } }