From d61005e419fb85b171adcfe8f0b61af6b1657d47 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Wed, 4 May 2016 20:58:18 -0700 Subject: [PATCH] Add rel=noopener noreferrer to autogenerated links --- src/channel/chat.js | 3 ++- src/xss.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/channel/chat.js b/src/channel/chat.js index 5c44df41..16204089 100644 --- a/src/channel/chat.js +++ b/src/channel/chat.js @@ -342,7 +342,8 @@ ChatModule.prototype.filterMessage = function (msg) { if (filtered !== link) { return filtered; } else if (convertLinks) { - return "" + link + ""; + return "" + link + ""; } else { return link; } diff --git a/src/xss.js b/src/xss.js index 4ebe3876..5c3fe3c8 100644 --- a/src/xss.js +++ b/src/xss.js @@ -29,7 +29,8 @@ const ALLOWED_ATTRIBUTES = [ "style", "title", "valign", - "width" + "width", + "rel" ]; const ALLOWED_SCHEMES = [