Skip to content

Commit

Permalink
Merge pull request #6457 from aaronraimist/more-url-schemes
Browse files Browse the repository at this point in the history
Allow all of the URL schemes that Firefox allows
  • Loading branch information
germain-gg committed Aug 4, 2021
2 parents 84af29a + 6c0e0dc commit d2aa7a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/HtmlUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ const BIGEMOJI_REGEX = new RegExp(`^(${EMOJIBASE_REGEX.source})+$`, 'i');

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

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

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

Expand Down

0 comments on commit d2aa7a3

Please sign in to comment.