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:
Daniil Kovalenko 2020-08-30 05:06:48 +07:00 committed by Mykola Solodukha
parent 1c9539f246
commit b353770589

View file

@ -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):