mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
[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 <jroot.junior@gmail.com>
This commit is contained in:
parent
141a550ab2
commit
6520b9fba2
2 changed files with 2 additions and 1 deletions
1
CHANGES/1608.misc.rst
Normal file
1
CHANGES/1608.misc.rst
Normal file
|
|
@ -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
|
||||
|
|
@ -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}</tg-emoji>'
|
||||
return f'<{self.EMOJI_TAG} emoji-id="{custom_emoji_id}">{value}</{self.EMOJI_TAG}>'
|
||||
|
||||
def blockquote(self, value: str) -> str:
|
||||
return f"<{self.BLOCKQUOTE_TAG}>{value}</{self.BLOCKQUOTE_TAG}>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue