Add rel="noopener" to external links

Fixes #4764
This commit is contained in:
Francis Lachapelle
2019-06-10 13:19:46 -04:00
parent 3129e149df
commit 0e918a446a
7 changed files with 8 additions and 5 deletions
@@ -14,7 +14,7 @@
function txt2html(linkyFilter) {
return function(text) {
// Linky will first sanitize the text; linefeeds are therefore encoded.
return text ? String(linkyFilter(text, ' _blank')).replace(/&#10;/gm, '<br>') : undefined;
return text ? String(linkyFilter(text, ' _blank', { rel: 'noopener' })).replace(/&#10;/gm, '<br>') : undefined;
};
}