Fix emote regex due to sanitize-html changes

This commit is contained in:
Calvin Montgomery 2017-03-14 21:36:44 -07:00
parent 9239c2d465
commit f6500ff745
3 changed files with 11 additions and 2 deletions

View file

@ -75,7 +75,7 @@ function validateEmote(f) {
f.image = f.image.substring(0, 1000);
f.image = XSS.sanitizeText(f.image);
var s = XSS.sanitizeText(f.name).replace(/([\\\.\?\+\*\$\^\|\(\)\[\]\{\}])/g, "\\$1");
var s = XSS.looseSanitizeText(f.name).replace(/([\\\.\?\+\*\$\^\|\(\)\[\]\{\}])/g, "\\$1");
s = "(^|\\s)" + s + "(?!\\S)";
f.source = s;