From 6520b9fba2376418daa034bc7411262a5c85ce5e Mon Sep 17 00:00:00 2001 From: Suren Khorenyan Date: Mon, 25 Nov 2024 23:08:05 +0300 Subject: [PATCH] [misc] fix tg-emoji closing tag: use constant (#1608) * fix tg-emoji closing tag: use constant * add changelog for tg-emoji closing tag fix * Update CHANGES/1608.misc.rst --------- Co-authored-by: Alex Root Junior --- CHANGES/1608.misc.rst | 1 + aiogram/utils/text_decorations.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 CHANGES/1608.misc.rst diff --git a/CHANGES/1608.misc.rst b/CHANGES/1608.misc.rst new file mode 100644 index 00000000..2641bb8c --- /dev/null +++ b/CHANGES/1608.misc.rst @@ -0,0 +1 @@ +Fixed closing tag for :code:`tg-emoji` in the :class:`aiogram.utils.text_decoration.HtmlDecoration`: use the same constant as for tag opening diff --git a/aiogram/utils/text_decorations.py b/aiogram/utils/text_decorations.py index 440fffa6..35f343d2 100644 --- a/aiogram/utils/text_decorations.py +++ b/aiogram/utils/text_decorations.py @@ -218,7 +218,7 @@ class HtmlDecoration(TextDecoration): return html.escape(value, quote=False) def custom_emoji(self, value: str, custom_emoji_id: str) -> str: - return f'<{self.EMOJI_TAG} emoji-id="{custom_emoji_id}">{value}' + return f'<{self.EMOJI_TAG} emoji-id="{custom_emoji_id}">{value}' def blockquote(self, value: str) -> str: return f"<{self.BLOCKQUOTE_TAG}>{value}"