diff --git a/lib/channel.js b/lib/channel.js index 4a8e9505..bec3c73d 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -2558,7 +2558,7 @@ Channel.prototype.validateEmote = function (f) { var s = f.name.replace(/\\\.\?\+\*\$\^\(\)\[\]\{\}/g, "\\$1"); s = s.replace(/&/g, "&").replace(//g, ">"); - s = "(^|\\s)" + s + "($|\\s)"; + s = "(^|\\s)" + s + "(?!\\S)"; f.source = s; try { diff --git a/www/js/util.js b/www/js/util.js index 022c0e2f..803ef12b 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -2323,7 +2323,7 @@ function execEmotes(msg) { CHANNEL.emotes.forEach(function (e) { msg = msg.replace(e.regex, '$1$2'); + e.image + '" title="' + e.name + '">'); }); return msg;