Skip to content

fix(webhook-telegram): escape MarkdownV2 code blocks#799

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
dicnunz:fix/telegram-markdown-code-escaping
Jul 17, 2026
Merged

fix(webhook-telegram): escape MarkdownV2 code blocks#799
ralyodio merged 1 commit into
profullstack:masterfrom
dicnunz:fix/telegram-markdown-code-escaping

Conversation

@dicnunz

@dicnunz dicnunz commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • escape backticks and backslashes inside Telegram MarkdownV2 preformatted blocks
  • add a regression test covering JSON data with both characters

Telegram requires every backtick and backslash inside pre and code entities to be escaped: https://core.telegram.org/bots/api#markdownv2-style

Without this, ordinary payload data such as Windows-style paths or Markdown snippets can break sendMessage parsing.

Verification

  • pnpm vitest run packages/webhooks/telegram/src/index.test.ts (9 passed)
  • pnpm --filter @profullstack/sh1pt-webhooks-telegram typecheck
  • git diff --check

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@ralyodio
ralyodio merged commit 286c0ef into profullstack:master Jul 17, 2026
4 checks passed
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.

2 participants