Markdown V2 sanitizer #80

Merged
skobkin merged 3 commits from markdown_v2_sanitizer into main 2025-08-12 23:56:58 +03:00
Owner

Summary

  • Added a dedicated markdown package that supplies SanitizeTelegramMarkdownV2 and EscapeURL, preserving Telegram-supported entities while escaping only the characters required by Markdown V2
  • Switched all bot handlers to ModeMarkdownV2, sanitizing replies, summaries, and stats output (wrapped in fenced code blocks) before sending
  • Removed legacy Markdown V1 helpers and migrated all modules to use the new sanitizer, backed by unit tests covering official examples, invalid tags, long replies, and URL escaping

Should close #76

# Summary - Added a dedicated markdown package that supplies `SanitizeTelegramMarkdownV2` and `EscapeURL`, preserving Telegram-supported entities while escaping only the characters required by Markdown V2 - Switched all bot handlers to `ModeMarkdownV2`, sanitizing replies, summaries, and stats output (wrapped in fenced code blocks) before sending - Removed legacy Markdown V1 helpers and migrated all modules to use the new sanitizer, backed by unit tests covering official examples, invalid tags, long replies, and URL escaping Should close #76
skobkin self-assigned this 2025-08-12 23:13:44 +03:00
Go dependencies upgrade.
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
fb068df660
Revert "Go dependencies upgrade."
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
6126f7ffcd
This reverts commit fb068df660.
skobkin deleted branch markdown_v2_sanitizer 2025-08-12 23:56:58 +03:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
skobkin/telegram-ollama-reply-bot!80
No description provided.