Skip to content

fix: escape markdown in error messages for Telegram#10

Open
michaelansel wants to merge 1 commit intoRichardAtCT:mainfrom
michaelansel:fix/error-message-escaping
Open

fix: escape markdown in error messages for Telegram#10
michaelansel wants to merge 1 commit intoRichardAtCT:mainfrom
michaelansel:fix/error-message-escaping

Conversation

@michaelansel
Copy link

Error messages containing JSON or special markdown characters break Telegram's markdown parser with "Can't parse entities" errors.

Changes:

  • Escape special markdown characters (_, *, `, [) in error messages
  • Truncate very long error messages to 200 characters
  • Prevents Telegram parse errors while preserving error visibility

Fixes Telegram markdown parsing errors when displaying error messages.

Error messages containing JSON or special markdown characters break
Telegram's markdown parser with "Can't parse entities" errors.

Changes:
- Escape special markdown characters (_, *, `, [) in error messages
- Truncate very long error messages to 200 characters
- Prevents Telegram parse errors while preserving error visibility

Fixes Telegram markdown parsing errors when displaying error messages.
@michaelansel
Copy link
Author

Like #9 I'm not 100% positive this was the issue, but I think it was a issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant