From a772c6dd8f87f737ea49c8b4fea78e8c6e1715a7 Mon Sep 17 00:00:00 2001 From: Rishab Arora Date: Sat, 1 Nov 2014 23:04:00 +0530 Subject: [PATCH] Added space before "target=" when added to href Fixes bug where the first links in markdown boxes don't work --- script/directives.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/directives.js b/script/directives.js index ff05f267e8..51c0dc170c 100644 --- a/script/directives.js +++ b/script/directives.js @@ -98,7 +98,7 @@ html = html.replace(userHighlight, "@"+userName+""); - html = html.replace(' href','target="'+linktarget+'" href'); + html = html.replace(' href',' target="'+linktarget+'" href'); element.html(html); }); } @@ -109,7 +109,7 @@ return function(input){ var html = md.toHtml(input); - html = html.replace(' href','target="_self" href'); + html = html.replace(' href',' target="_self" href'); return html; }; @@ -125,4 +125,4 @@ habitrpg.directive('questRewards', ['$rootScope', function($rootScope){ scope.quest = $rootScope.Content.quests[attrs.key]; } } -}]); \ No newline at end of file +}]);