Fix MarkdownV2 escaping causing Telegram 400 errors #73

Merged
cpressland merged 1 commit from fix/telegram-markdown-escape into master 2026-09-11 14:22:47 +01:00
Collaborator

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 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.
Escape remaining MarkdownV2 reserved characters in telegram messages
All checks were successful
ci / build (push) Successful in 19s
cd9f5a7ca4
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.
cpressland deleted branch fix/telegram-markdown-escape 2026-09-11 14:22:47 +01:00
Sign in to join this conversation.
No description provided.