diff --git a/src/Utils.cpp b/src/Utils.cpp index 0e193c43..d0b6818d 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -131,8 +131,14 @@ utils::replaceEmoji(const QString &body) QVector utf32_string = body.toUcs4(); bool insideFontBlock = false; + bool insideTag = false; 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) { fmtBody += QStringLiteral("emojiFont() % QStringLiteral("\">");