From a893cdaebe3dedafb625ee1e93fa6387f1a251b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= Date: Sat, 20 Mar 2021 23:49:42 +0100 Subject: [PATCH] Ensure twitch emote names are escaped (#2543) --- CHANGELOG.md | 2 +- src/providers/twitch/TwitchEmotes.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c48ed5c5..e64b4b2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,7 +71,7 @@ - Bugfix: Fixed previous link info not updating after `Link information` setting is enabled (#2054) - Bugfix: Fix Tab key not working in the Ctrl+K Quick Switcher (#2065) - Bugfix: Fix bug preventing moderator actions when viewing a user card from the search window (#1089) -- Bugfix: Fix `:` emote completion menu ignoring emote capitalization (#1962) +- Bugfix: Fix `:` emote completion menu ignoring emote capitalization and inconsistent emote names. (#1962, #2543) - Bugfix: Fix a bug that caused `Ignore page` to fall into an infinity loop with an empty pattern and regex enabled (#2125) - Bugfix: Fix a crash caused by FrankerFaceZ responding with invalid emote links (#2191) - Bugfix: Fix a freeze caused by ignored & replaced phrases followed by Twitch Emotes (#2231) diff --git a/src/providers/twitch/TwitchEmotes.cpp b/src/providers/twitch/TwitchEmotes.cpp index 0f1bf546..cf8d091c 100644 --- a/src/providers/twitch/TwitchEmotes.cpp +++ b/src/providers/twitch/TwitchEmotes.cpp @@ -75,7 +75,7 @@ EmotePtr TwitchEmotes::getOrCreateEmote(const EmoteId &id, if (!shared) { (*cache)[id] = shared = std::make_shared(Emote{ - EmoteName{name}, + EmoteName{TwitchEmotes::cleanUpEmoteCode(EmoteName{name})}, ImageSet{ Image::fromUrl(getEmoteLink(id, "1.0"), 1), Image::fromUrl(getEmoteLink(id, "2.0"), 0.5),