From d4d6fb66866741f27d3e73b120bfd31ebc11539b Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Tue, 9 Jul 2013 21:50:57 -0400 Subject: [PATCH] Allow style attr because people keep bitchin about it --- channel.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/channel.js b/channel.js index e81b2787..e2dcab49 100644 --- a/channel.js +++ b/channel.js @@ -1608,7 +1608,10 @@ Channel.prototype.tryUpdateFilter = function(user, f) { var re = f.source; var flags = f.flags; + // Temporary fix + f.replace = f.replace.replace("style", "stlye"); f.replace = sanitize(f.replace).xss(); + f.replace = f.replace.replace("stlye", "style"); try { new RegExp(re, flags); } @@ -1711,7 +1714,10 @@ Channel.prototype.trySetJS = function(user, data) { Channel.prototype.updateMotd = function(motd) { var html = motd.replace(/\n/g, "
"); + // Temporary fix + html = html.replace("style", "stlye"); html = sanitize(html).xss(); + html = html.replace("stlye", "style"); //html = this.filterMessage(html); this.motd = { motd: motd,