|
|
@ -131,8 +131,14 @@ utils::replaceEmoji(const QString &body) |
|
|
|
QVector<uint> utf32_string = body.toUcs4(); |
|
|
|
QVector<uint> utf32_string = body.toUcs4(); |
|
|
|
|
|
|
|
|
|
|
|
bool insideFontBlock = false; |
|
|
|
bool insideFontBlock = false; |
|
|
|
|
|
|
|
bool insideTag = false; |
|
|
|
for (auto &code : utf32_string) { |
|
|
|
for (auto &code : utf32_string) { |
|
|
|
if (utils::codepointIsEmoji(code)) { |
|
|
|
if (code == U'<') |
|
|
|
|
|
|
|
insideTag = true; |
|
|
|
|
|
|
|
else if (code == U'>') |
|
|
|
|
|
|
|
insideTag = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!insideTag && utils::codepointIsEmoji(code)) { |
|
|
|
if (!insideFontBlock) { |
|
|
|
if (!insideFontBlock) { |
|
|
|
fmtBody += QStringLiteral("<font face=\"") % UserSettings::instance()->emojiFont() % |
|
|
|
fmtBody += QStringLiteral("<font face=\"") % UserSettings::instance()->emojiFont() % |
|
|
|
QStringLiteral("\">"); |
|
|
|
QStringLiteral("\">"); |
|
|
|