Add rel=noopener noreferrer to autogenerated links

This commit is contained in:
calzoneman 2016-05-04 20:58:18 -07:00
parent 59c7571ad5
commit d61005e419
2 changed files with 4 additions and 2 deletions

View File

@ -342,7 +342,8 @@ ChatModule.prototype.filterMessage = function (msg) {
if (filtered !== link) {
return filtered;
} else if (convertLinks) {
return "<a href=\"" + link + "\" target=\"_blank\">" + link + "</a>";
return "<a href=\"" + link + "\" target=\"_blank\" " +
"rel=\"noopener noreferrer\">" + link + "</a>";
} else {
return link;
}

View File

@ -29,7 +29,8 @@ const ALLOWED_ATTRIBUTES = [
"style",
"title",
"valign",
"width"
"width",
"rel"
];
const ALLOWED_SCHEMES = [