unsure our vector url match could ever return undefined, but apparently it is...
This commit is contained in:
Matthew Hodgson 2017-05-15 01:32:37 +01:00
parent f3274426db
commit c0cead1546

View file

@ -148,7 +148,7 @@ var sanitizeHtmlParams = {
attribs.href = m[1]; attribs.href = m[1];
delete attribs.target; delete attribs.target;
} }
else {
m = attribs.href.match(linkifyMatrix.MATRIXTO_URL_PATTERN); m = attribs.href.match(linkifyMatrix.MATRIXTO_URL_PATTERN);
if (m) { if (m) {
var entity = m[1]; var entity = m[1];
@ -161,6 +161,7 @@ var sanitizeHtmlParams = {
delete attribs.target; delete attribs.target;
} }
} }
}
attribs.rel = 'noopener'; // https://mathiasbynens.github.io/rel-noopener/ attribs.rel = 'noopener'; // https://mathiasbynens.github.io/rel-noopener/
return { tagName: tagName, attribs : attribs }; return { tagName: tagName, attribs : attribs };
}, },