mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fix HTML characters escaping (#409)
html.escape replaces " and ' characters by default, but it's not required by Telegram and causes unexpected behavior, quote=False argument fixes that.
This commit is contained in:
parent
00cff4acf5
commit
d8c6214170
1 changed files with 1 additions and 1 deletions
|
|
@ -159,7 +159,7 @@ class HtmlDecoration(TextDecoration):
|
|||
return f"<s>{value}</s>"
|
||||
|
||||
def quote(self, value: str) -> str:
|
||||
return html.escape(value)
|
||||
return html.escape(value, quote=False)
|
||||
|
||||
|
||||
class MarkdownDecoration(TextDecoration):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue