Fix emote issues as discussed in #347

This commit is contained in:
calzoneman 2014-04-13 02:06:28 -05:00
parent 445d8be55d
commit cfe34112a4
1 changed files with 1 additions and 2 deletions

View File

@ -2558,8 +2558,7 @@ Channel.prototype.validateEmote = function (f) {
f.image = f.image.substring(0, 1000);
f.image = XSS.sanitizeText(f.image);
var s = f.name.replace(/\\\.\?\+\*\$\^\(\)\[\]\{\}/g, "\\$1");
s = s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
var s = XSS.sanitizeText(f.name).replace(/([\\\.\?\+\*\$\^\(\)\[\]\{\}])/g, "\\$1");
s = "(^|\\s)" + s + "(?!\\S)";
f.source = s;