diff options
Diffstat (limited to 'web/react/utils/text_formatting.jsx')
-rw-r--r-- | web/react/utils/text_formatting.jsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx index 34e42cbae..b8ed58258 100644 --- a/web/react/utils/text_formatting.jsx +++ b/web/react/utils/text_formatting.jsx @@ -96,8 +96,13 @@ function autolinkUrls(text, tokens) { const index = tokens.size; const alias = `MM_LINK${index}`; + var target = 'target="_blank"'; + if (url.lastIndexOf(Utils.getTeamURLFromAddressBar(), 0) === 0) { + target = ''; + } + tokens.set(alias, { - value: `<a class='theme' target='_blank' href='${url}'>${linkText}</a>`, + value: '<a class="theme"' + target + ' href="${url}">${linkText}</a>', originalText: linkText }); |