You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-07 21:23:00 +03:00
Fix relative link handling in Element Desktop (#7708)
This commit is contained in:
committed by
GitHub
parent
f0446a23d5
commit
760d269671
@@ -132,9 +132,9 @@ const escapeRegExp = function(string): string {
|
||||
};
|
||||
|
||||
// Recognise URLs from both our local and official Element deployments.
|
||||
// Anyone else really should be using matrix.to.
|
||||
// Anyone else really should be using matrix.to. vector:// allowed to support Element Desktop relative links.
|
||||
export const ELEMENT_URL_PATTERN =
|
||||
"^(?:https?://)?(?:" +
|
||||
"^(?:vector://|https?://)?(?:" +
|
||||
escapeRegExp(window.location.host + window.location.pathname) + "|" +
|
||||
"(?:www\\.)?(?:riot|vector)\\.im/(?:app|beta|staging|develop)/|" +
|
||||
"(?:app|beta|staging|develop)\\.element\\.io/" +
|
||||
|
Reference in New Issue
Block a user