mirror of https://github.com/calzoneman/sync.git
Add rel=noopener noreferrer to autogenerated links
This commit is contained in:
parent
59c7571ad5
commit
d61005e419
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,8 @@ const ALLOWED_ATTRIBUTES = [
|
|||
"style",
|
||||
"title",
|
||||
"valign",
|
||||
"width"
|
||||
"width",
|
||||
"rel"
|
||||
];
|
||||
|
||||
const ALLOWED_SCHEMES = [
|
||||
|
|
Loading…
Reference in New Issue