openclaw - 💡(How to fix) Fix Telegram: code blocks sometimes render literal <code class="language-..."> tags instead of formatted code [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Telegram sometimes shows literal HTML tags for code blocks, for example:

<code class="language-text"></code>

instead of rendering a formatted code block.

Root Cause

Telegram sometimes shows literal HTML tags for code blocks, for example:

<code class="language-text"></code>

instead of rendering a formatted code block.

Fix Action

Fixed

Code Example

<code class="language-text"></code>
RAW_BUFFERClick to expand / collapse

Summary

Telegram sometimes shows literal HTML tags for code blocks, for example:

<code class="language-text"></code>

instead of rendering a formatted code block.

Expected behavior

The message should render as a Telegram code block, not expose literal HTML tags to the user.

Why this appears to be an OpenClaw outbound issue

Local inspection of the installed OpenClaw build shows that the Telegram formatter already emits class="language-..." for fenced code blocks.

That suggests the remaining problem is likely downstream of formatting, for example:

  • HTML escaping before final send
  • plain-text fallback on one outbound path
  • parse_mode=HTML not being applied consistently across outbound/reply paths

Environment

  • OpenClaw: 2026.3.22
  • Runtime model in the affected chat: gpt-5.4
  • Channel: Telegram direct chat
  • Host OS: Linux 6.6.87.2-microsoft-standard-WSL2 x86_64
  • Runtime: WSL2
  • Node.js: v24.14.1
  • Python: 3.12.3

Possibly related

  • #10519
  • #22416
  • #3952

Notes

This may be distinct from the original “missing language class” problem: here the classed HTML appears to be generated, but leaked literally into Telegram output.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The message should render as a Telegram code block, not expose literal HTML tags to the user.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Telegram: code blocks sometimes render literal <code class="language-..."> tags instead of formatted code [1 pull requests]