From 09de27644d7b2d8afc74efe94094695bdb0b2cf8 Mon Sep 17 00:00:00 2001 From: Xaekai Date: Wed, 15 Apr 2015 23:07:12 -0700 Subject: [PATCH] Allow mumble:// links through XSS filter --- lib/xss.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/xss.js b/lib/xss.js index b8a379e9..4ebe3876 100644 --- a/lib/xss.js +++ b/lib/xss.js @@ -32,6 +32,10 @@ const ALLOWED_ATTRIBUTES = [ "width" ]; +const ALLOWED_SCHEMES = [ + "mumble" +]; + var ATTRIBUTE_MAP = { a: ["href", "name", "target"], font: ["size"], @@ -55,6 +59,7 @@ sanitizeHTML.defaults.allowedTags.concat(ALLOWED_TAGS).forEach(function (tag) { }); const SETTINGS = { + allowedSchemes: sanitizeHTML.defaults.allowedSchemes.concat(ALLOWED_SCHEMES), allowedTags: sanitizeHTML.defaults.allowedTags.concat(ALLOWED_TAGS), allowedAttributes: ATTRIBUTE_MAP };