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) {
|
if (filtered !== link) {
|
||||||
return filtered;
|
return filtered;
|
||||||
} else if (convertLinks) {
|
} else if (convertLinks) {
|
||||||
return "<a href=\"" + link + "\" target=\"_blank\">" + link + "</a>";
|
return "<a href=\"" + link + "\" target=\"_blank\" " +
|
||||||
|
"rel=\"noopener noreferrer\">" + link + "</a>";
|
||||||
} else {
|
} else {
|
||||||
return link;
|
return link;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,8 @@ const ALLOWED_ATTRIBUTES = [
|
||||||
"style",
|
"style",
|
||||||
"title",
|
"title",
|
||||||
"valign",
|
"valign",
|
||||||
"width"
|
"width",
|
||||||
|
"rel"
|
||||||
];
|
];
|
||||||
|
|
||||||
const ALLOWED_SCHEMES = [
|
const ALLOWED_SCHEMES = [
|
||||||
|
|
Loading…
Reference in New Issue