diff --git a/src/HtmlUtils.js b/src/HtmlUtils.js index 2266522bfec..914ab7ff3f2 100644 --- a/src/HtmlUtils.js +++ b/src/HtmlUtils.js @@ -167,6 +167,7 @@ const transformTags = { // custom to matrix } } attribs.rel = 'noopener'; // https://mathiasbynens.github.io/rel-noopener/ + attribs.rel += ' noreferrer'; return { tagName, attribs }; }, 'img': function(tagName, attribs) { @@ -181,6 +182,7 @@ const transformTags = { // custom to matrix attribs.width || 800, attribs.height || 600, ); + attribs.rel = 'noreferrer'; return { tagName, attribs }; }, 'code': function(tagName, attribs) { diff --git a/src/linkify-matrix.js b/src/linkify-matrix.js index fabd9d15adc..54ba09c6e52 100644 --- a/src/linkify-matrix.js +++ b/src/linkify-matrix.js @@ -227,7 +227,7 @@ matrixLinkify.options = { }, linkAttributes: { - rel: 'noopener', + rel: 'noopener noreferrer', }, target: function(href, type) {