diff options
Diffstat (limited to 'web/react/utils/text_formatting.jsx')
-rw-r--r-- | web/react/utils/text_formatting.jsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx index 2b6e6e14e..d79aeed68 100644 --- a/web/react/utils/text_formatting.jsx +++ b/web/react/utils/text_formatting.jsx @@ -89,7 +89,7 @@ function autolinkUrls(text, tokens) { if (match.getType() === 'email') { url = `mailto:${url}`; - } else if (url.lastIndexOf('http', 0) !== 0) { + } else if (!(/^(mailto|https?|ftp)/.test(url))) { url = `http://${url}`; } |