Fix MarkdownV2 escaping causing Telegram 400 errors #73
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
cpressland/holly_willoughbot!73
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/telegram-markdown-escape"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds missing MarkdownV2 reserved characters ([, ], {, }, ~,
) to the escape translation table in telegram.py send_message(). Reddit post/comment bodies commonly contain unescaped](markdown links, YouTube share URLs like?is=...`), which triggered Telegram Bad Request 400: can't parse entities, falling back to the raw unformatted exception payload.Adds [, ], {, }, ~, and ` to the escape translation table used by send_message(). Reddit post/comment bodies frequently contain unescaped ']' (e.g. from markdown links or YouTube URLs), which was causing Telegram's Bad Request 400 'can't parse entities' error and falling back to the unformatted exception payload.