Skip to content

fix: render inline formatting in markdown table cells (#273) - #281

Merged
nesquena-hermes merged 1 commit into
masterfrom
fix/table-cell-inline-formatting-reviewed
Apr 12, 2026
Merged

nesquena-hermes merged 1 commit into
masterfrom
fix/table-cell-inline-formatting-reviewed

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Reviewed merge of PR #278 (fix: render inline formatting in markdown table cells).

PR was cut from pre-v0.48.0 master and contained stale-base noise that would have reverted the gateway session sync (PR #274), deleted test_gateway_sync.py, and rolled back docs to v0.47.1. Cherry-picked only the genuine fix commit (a2ecdca) onto current master.

The fix: esc()inlineMd() in table cell parseRow/parseHeader in static/ui.js (2 lines). Allows **bold**, *italic*, `code`, [links](url) to render correctly in markdown table cells. Already used for list items and blockquotes.

Security: inlineMd() escapes all interpolated values via esc(), has a SAFE_INLINE allowlist, and the outer SAFE_TAGS pass at the end of renderMd() provides a second layer. XSS test confirmed: <script>alert(1)</script> in a table cell renders as &lt;script&gt;....

Tests: 658/658 pass (no regressions). Browser QA confirmed inline formatting renders in table headers and cells.

Closes #273.

Table cells used esc() which escaped all HTML including <strong>,
<em>, <code> tags. Changed to inlineMd() which processes markdown
bold/italic/code/links and allows safe HTML tags through.

This runs after the pre-pass that converts <strong> to ** and
<em> to *, so both HTML tags and markdown syntax in table cells
are rendered correctly.

Fixes #273

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nesquena-hermes
nesquena-hermes merged commit ce84d1b into master Apr 12, 2026
@nesquena-hermes
nesquena-hermes deleted the fix/table-cell-inline-formatting-reviewed branch April 12, 2026 04:03
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.

Markdown table rendering: HTML <strong> tags shown as raw text in workspace file preview

2 participants