fixed < in emote names breaking the <br> and tooltips on mac

This commit is contained in:
nuuls
2018-01-07 23:47:08 +01:00
parent 92cc1f354b
commit 1eb256bd4e
2 changed files with 9 additions and 4 deletions
+7 -4
View File
@@ -542,14 +542,17 @@ void EmoteManager::loadFFZEmotes()
// emoteName is used for giving a name to the emote in case it doesn't exist
util::EmoteData EmoteManager::getTwitchEmoteById(long id, const QString &emoteName)
{
return _twitchEmoteFromCache.getOrAdd(id, [this, &emoteName, &id] {
QString _emoteName = emoteName;
_emoteName.replace("<", "&lt;");
return _twitchEmoteFromCache.getOrAdd(id, [this, &emoteName, &_emoteName, &id] {
util::EmoteData newEmoteData;
newEmoteData.image1x = new LazyLoadedImage(GetTwitchEmoteLink(id, "1.0"), 1, emoteName,
emoteName + "<br/>Twitch Emote 1x");
_emoteName + "<br/>Twitch Emote 1x");
newEmoteData.image2x = new LazyLoadedImage(GetTwitchEmoteLink(id, "2.0"), .5, emoteName,
emoteName + "<br/>Twitch Emote 2x");
_emoteName + "<br/>Twitch Emote 2x");
newEmoteData.image3x = new LazyLoadedImage(GetTwitchEmoteLink(id, "3.0"), .25, emoteName,
emoteName + "<br/>Twitch Emote 3x");
_emoteName + "<br/>Twitch Emote 3x");
return newEmoteData;
});