mirror of https://github.com/calzoneman/sync.git
Fix emote issues as discussed in #347
This commit is contained in:
parent
445d8be55d
commit
cfe34112a4
|
@ -2558,8 +2558,7 @@ Channel.prototype.validateEmote = function (f) {
|
||||||
f.image = f.image.substring(0, 1000);
|
f.image = f.image.substring(0, 1000);
|
||||||
f.image = XSS.sanitizeText(f.image);
|
f.image = XSS.sanitizeText(f.image);
|
||||||
|
|
||||||
var s = f.name.replace(/\\\.\?\+\*\$\^\(\)\[\]\{\}/g, "\\$1");
|
var s = XSS.sanitizeText(f.name).replace(/([\\\.\?\+\*\$\^\(\)\[\]\{\}])/g, "\\$1");
|
||||||
s = s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
||||||
s = "(^|\\s)" + s + "(?!\\S)";
|
s = "(^|\\s)" + s + "(?!\\S)";
|
||||||
f.source = s;
|
f.source = s;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue