diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-06-02 18:48:43 -0400 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2016-06-02 19:48:43 -0300 |
commit | 0e677f35bbcd048facdc78d0e959fa2441975065 (patch) | |
tree | 78443d2471cb7ac505e2525ef9c90ed45c7b165c /webapp | |
parent | 3083d4094ca58c75b4b10270ff3bdfcacb5fa0d7 (diff) | |
download | chat-0e677f35bbcd048facdc78d0e959fa2441975065.tar.gz chat-0e677f35bbcd048facdc78d0e959fa2441975065.tar.bz2 chat-0e677f35bbcd048facdc78d0e959fa2441975065.zip |
Removed hashtag/mention links that appear within text for markdown links (#3199)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/utils/markdown.jsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/utils/markdown.jsx b/webapp/utils/markdown.jsx index b128bd3e8..73af4ae91 100644 --- a/webapp/utils/markdown.jsx +++ b/webapp/utils/markdown.jsx @@ -162,7 +162,8 @@ class MattermostMarkdownRenderer extends marked.Renderer { output += ' title="' + title + '"'; } - output += '>' + text + '</a>'; + // remove any links added to the text by hashtag or mention parsing since they'll break this link + output += '>' + text.replace(/<\/?a[^>]*>/, '') + '</a>'; return output; } |