Describe the bug
Telegram notifications break if message has an odd number of "_" (underscore)s. Messages are sent with parse_mode: markdown and the Telegram Bot API attempts to interpret these unescaped underscores as Markdown italics, but fails when it finds an odd number.
Produces error error : Telegram: StatusCodeError: 400 - {"ok":false,"error_code":400,"description":"Bad Request: can't parse entities: Can't find end of the entity starting at byte offset ...
To Reproduce
Steps to reproduce the behavior:
Receive page with odd number of underscores with Telegram notifications enabled.
Telegram bot API returns error due to not being able to parse the Markdown it expects.
Additional context
This could be solved by escaping Markdown special characters in the message before sending to Telegram API
Describe the bug Telegram notifications break if message has an odd number of "_" (underscore)s. Messages are sent with
parse_mode: markdown
and the Telegram Bot API attempts to interpret these unescaped underscores as Markdown italics, but fails when it finds an odd number. Produces errorerror : Telegram: StatusCodeError: 400 - {"ok":false,"error_code":400,"description":"Bad Request: can't parse entities: Can't find end of the entity starting at byte offset ...
To Reproduce Steps to reproduce the behavior:
Additional context This could be solved by escaping Markdown special characters in the message before sending to Telegram API