Fix MOTD XSS filter stripping style tags

This commit is contained in:
calzoneman 2013-10-20 20:04:09 -05:00
parent 9be513221e
commit 33e5f2e056
2 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,6 @@
Sun Oct 20 20:02 2013 CDT
* lib/channel.js: Fix MOTD XSS filter stripping style tags
Sat Oct 19 12:20 2013 CDT
* lib/channel.js: Remove some unnecessary packets

View File

@ -2139,9 +2139,9 @@ Channel.prototype.trySetJS = function(user, data) {
Channel.prototype.updateMotd = function(motd) {
var html = motd.replace(/\n/g, "<br>");
// Temporary fix
html = html.replace("style", "stlye");
html = html.replace(/style/g, "stlye");
html = sanitize(html).xss();
html = html.replace("stlye", "style");
html = html.replace(/stlye/g, "style");
//html = this.filterMessage(html);
this.motd = {
motd: motd,