diff options
author | Asaad Mahmood <Unknowngi@live.com> | 2015-10-02 22:26:28 +0500 |
---|---|---|
committer | Asaad Mahmood <Unknowngi@live.com> | 2015-10-02 22:26:28 +0500 |
commit | d8c5c4f7468bb07d8de904437726557c6fa9b436 (patch) | |
tree | c19af28e1ad6c2bf068bf64956461c25502f9bb3 /web/react/utils/text_formatting.jsx | |
parent | 813792dd600f4e485d52cc1066a8c1297578432d (diff) | |
parent | 41069d83d2b6ad5cca599f75292027e13d5b10f7 (diff) | |
download | chat-d8c5c4f7468bb07d8de904437726557c6fa9b436.tar.gz chat-d8c5c4f7468bb07d8de904437726557c6fa9b436.tar.bz2 chat-d8c5c4f7468bb07d8de904437726557c6fa9b436.zip |
Merge branch 'master' of https://github.com/mattermost/platform into plt-375
Conflicts:
web/react/components/user_settings/user_settings_appearance.jsx
Diffstat (limited to 'web/react/utils/text_formatting.jsx')
-rw-r--r-- | web/react/utils/text_formatting.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx index 56bf49c3f..34e42cbae 100644 --- a/web/react/utils/text_formatting.jsx +++ b/web/react/utils/text_formatting.jsx @@ -87,8 +87,10 @@ function autolinkUrls(text, tokens) { const linkText = match.getMatchedText(); let url = linkText; - if (url.lastIndexOf('http', 0) !== 0) { - url = `http://${linkText}`; + if (match.getType() === 'email') { + url = `mailto:${url}`; + } else if (url.lastIndexOf('http', 0) !== 0) { + url = `http://${url}`; } const index = tokens.size; |