Skip to content

feat: escape HTML - #881

Merged
rich-iannone merged 11 commits into
mainfrom
feat-escape-html
Sep 21, 2026
Merged

rich-iannone merged 11 commits into
mainfrom
feat-escape-html

Conversation

@rich-iannone

Copy link
Copy Markdown
Member

This PR adds HTML-escaping of unformatted body cells whenever a table is rendered as HTML. This is whether the table is displayed in a notebook, shown via show(), or exported with as_raw_html(). Previously, only LaTeX output escaped unformatted cells but this change extends that to all output contexts.

Cells processed by any fmt_*() method are treated as trusted and pass through unchanged. The escaping also covers group labels (when derived from raw group_id rather than a formatted group_label) and summary stub labels.

A new fmt_passthrough() method gives users explicit control: escape=True (default) escapes special characters, escape=False passes raw HTML/LaTeX through, and pattern= decorates values without transforming them.

@rich-iannone rich-iannone changed the title Feat escape html feat: escape HTML Sep 21, 2026
@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.36585% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.71%. Comparing base (764038b) to head (ecd3fb0).

Files with missing lines Patch % Lines
great_tables/_formats.py 77.77% 4 Missing ⚠️
great_tables/_utils_render_latex.py 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #881      +/-   ##
==========================================
- Coverage   98.83%   98.71%   -0.12%     
==========================================
  Files          51       51              
  Lines        7696     7718      +22     
==========================================
+ Hits         7606     7619      +13     
- Misses         90       99       +9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rich-iannone
rich-iannone merged commit 29fa5b0 into main Sep 21, 2026
13 of 15 checks passed
@rich-iannone
rich-iannone deleted the feat-escape-html branch September 21, 2026 21:20

This branch was successfully deployed

1 active deployment
pr-881 — ecd3fb08 Deployed Sep 21, 2026 by github-actions[bot]
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