diff --git a/package.json b/package.json index 35468f23..c38ac565 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "3.44.1", + "version": "3.44.2", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/www/js/data.js b/www/js/data.js index cc09255f..a5c30dcd 100644 --- a/www/js/data.js +++ b/www/js/data.js @@ -73,7 +73,7 @@ CyTube.ui = { suppressedAnnouncementId: getOpt("suppressed_announcement_id") }; CyTube.featureFlag = { - efficientEmotes: false + efficientEmotes: true }; function getOpt(k) { diff --git a/www/js/util.js b/www/js/util.js index 0de32c95..f2a40145 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -2639,6 +2639,14 @@ function formatUserPlaylistList() { } function loadEmotes(data) { + function sanitizeText(str) { + str = str.replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """); + return str; + } + CHANNEL.emotes = []; CHANNEL.emoteMap = {}; CHANNEL.badEmotes = []; @@ -2650,7 +2658,7 @@ function loadEmotes(data) { // Emotes with spaces can't be hashmapped CHANNEL.badEmotes.push(e); } else { - CHANNEL.emoteMap[e.name] = e; + CHANNEL.emoteMap[sanitizeText(e.name)] = e; } } else { console.error("Rejecting invalid emote: " + JSON.stringify(e));