From 0e677f35bbcd048facdc78d0e959fa2441975065 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Thu, 2 Jun 2016 18:48:43 -0400 Subject: Removed hashtag/mention links that appear within text for markdown links (#3199) --- webapp/utils/markdown.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'webapp/utils') 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 + ''; + // remove any links added to the text by hashtag or mention parsing since they'll break this link + output += '>' + text.replace(/<\/?a[^>]*>/, '') + ''; return output; } -- cgit v1.2.3-1-g7c22