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 GitHub
parent 00cff4acf5
commit d8c6214170
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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