Apply URL encoding to the fragmentPath
According to RFC3986 section 3.5, only certain values are legal in the fragment. # in particular isn't one of them, but this is a character that appears in room names. It shouldn't hurt to escape other, otherwise legal characters in the fragment such as @ and :.
This commit is contained in:
parent
7d22a57874
commit
b302bd6829
1 changed files with 2 additions and 2 deletions
|
@ -74,9 +74,9 @@ export class Element {
|
|||
}
|
||||
return `https://${instanceHost}/#/${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)}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue