Relationships
#4669 Render <details>/<summary> in serve's report view
Opened by dmc · 11/11/2026
Problem
The swamp serve web UI shows a report's Markdown in the "Rendered" tab. It escapes all raw HTML, so <details> and <summary> show as literal text, not as a collapsible section.
Reports use <details> to hide long tables until the reader wants them, for example the package list of each run in a per-host history. GitHub, Forgejo and most Markdown viewers render these two tags. In serve, the reader sees the tags as text, and the long tables are always open.
Example report output:
<details><summary>2026-11-10 17:59 UTC — osUpdate details</summary>
| Package | From | To |
| ------- | ---- | -- |
| kernel-core | 6.12.0-211.73.1.el10_2 | 6.12.0-211.74.1.el10_2 |
</details>Serve shows the first line and </details> as literal text, between the run table and the package table.
Proposed solution
Allow <details> and <summary> in the rendered report view, with no attributes (or only open on <details>). Keep escaping all other raw HTML. Report content often carries text that came from managed hosts, so the escape is the right default. A narrow allowlist of these two tags adds no script, link or style path.
Alternatives
- Reports drop
<details>and use headings. This works, but long per-run tables then fill the page. - A report-level option to render a section as collapsed. This needs more API than the two-tag allowlist.
Environment
swamp 20261111.180503.0-sha.4fa5f6e1, swamp serve web UI, report "Rendered" tab.
Open
No activity in this phase yet.
Sign in to post a ripple.