Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit d2aa7a3

Browse files
authored
Merge pull request #6457 from aaronraimist/more-url-schemes
Allow all of the URL schemes that Firefox allows
2 parents 84af29a + 6c0e0dc commit d2aa7a3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/HtmlUtils.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ const BIGEMOJI_REGEX = new RegExp(`^(${EMOJIBASE_REGEX.source})+$`, 'i');
5757

5858
const COLOR_REGEX = /^#[0-9a-fA-F]{6}$/;
5959

60-
export const PERMITTED_URL_SCHEMES = ['http', 'https', 'ftp', 'mailto', 'magnet', 'matrix'];
60+
export const PERMITTED_URL_SCHEMES = ["bitcoin", "ftp", "geo", "http", "https", "im", "irc",
61+
"ircs", "magnet", "mailto", "matrix", "mms", "news",
62+
"nntp", "openpgp4fpr", "sip", "sftp", "sms", "smsto",
63+
"ssh", "tel", "urn", "webcal", "wtai", "xmpp"];
6164

6265
const MEDIA_API_MXC_REGEX = /\/_matrix\/media\/r0\/(?:download|thumbnail)\/(.+?)\/(.+?)(?:[?/]|$)/;
6366

0 commit comments

Comments
 (0)