From 5f7ce2214a9fd91a0ab62312674f5cffd811f8ca Mon Sep 17 00:00:00 2001
From: Harrison Healey <harrisonmhealey@gmail.com>
Date: Wed, 1 Jun 2016 08:52:28 -0400
Subject: Improved internal links which use react-router (#3180)

---
 webapp/utils/markdown.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'webapp/utils/markdown.jsx')

diff --git a/webapp/utils/markdown.jsx b/webapp/utils/markdown.jsx
index 6691b57b2..b128bd3e8 100644
--- a/webapp/utils/markdown.jsx
+++ b/webapp/utils/markdown.jsx
@@ -149,13 +149,13 @@ class MattermostMarkdownRenderer extends marked.Renderer {
             outHref = `http://${outHref}`;
         }
 
-        let output = '<a class="theme markdown__link" ';
+        let output = '<a class="theme markdown__link" href="' + outHref + '" rel="noreferrer"';
 
         // special case for links that are inside the app
         if (outHref.startsWith(global.location.origin)) {
-            output += 'data-link="' + outHref.substring(global.location.origin.length) + '"';
+            output += ' data-link="' + outHref.substring(global.location.origin.length) + '"';
         } else {
-            output += 'href="' + outHref + '" target="_blank" rel="noreferrer"';
+            output += ' target="_blank"';
         }
 
         if (title) {
-- 
cgit v1.2.3-1-g7c22

