Fix emotes
This commit is contained in:
parent
e8daf33146
commit
7711587f15
2 changed files with 4 additions and 4 deletions
|
|
@ -270,7 +270,7 @@ Channel.prototype.loadState = function () {
|
|||
// Emotes
|
||||
if ("emotes" in data) {
|
||||
data.emotes.forEach(function (e) {
|
||||
self.emotes.push(e);
|
||||
self.updateEmote(e);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -2505,7 +2505,7 @@ Channel.prototype.validateEmote = function (f) {
|
|||
|
||||
var s = f.name.replace(/\\\.\?\+\*\$\^\(\)\[\]\{\}/g, "\\$1");
|
||||
s = s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
||||
s = "(^|\\b)" + s + "($|\\b)";
|
||||
s = "(^|\\s)" + s + "($|\\s)";
|
||||
f.source = s;
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue