Skip to content

Commit

Permalink
[CODE] Make sure all hyperlinks (and not just the first one) are give…
Browse files Browse the repository at this point in the history
  • Loading branch information
paambaati committed Mar 15, 2017
1 parent 98a8180 commit 098bc6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions themes/radar/code/utils/inputSanitizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ const _ = {
showdown.extension('targetlink', function() {
return [{
type: 'html',
regex: /(<a [^>]+?)(>.*<\/a>)/g,
replace: '$1 target="_blank"$2'
filter: function (text) {
return (''+text).replace(/<a\s+href=/gi, '<a target="_blank" href=');
}
}];
});

Expand Down

0 comments on commit 098bc6e

Please sign in to comment.