From ad140da56d9c3283e0f212bd4bce6f242c0d58ef Mon Sep 17 00:00:00 2001 From: Amolith Date: Sun, 9 Nov 2025 18:23:35 -0700 Subject: [PATCH] feat(webui): allow details and summary tags The Markdown sanitizer now preserves
and tags, enabling collapsible sections in README files and blob views. Added test coverage to verify these tags are properly preserved through the sanitization process. Closes: bug-f881844 Assisted-by: Claude Sonnet 4.5 via Crush --- pkg/web/sanitizer_test.go | 12 ++++++++++++ pkg/web/webui_helpers.go | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pkg/web/sanitizer_test.go b/pkg/web/sanitizer_test.go index 2228522ec786c43f5bb5b530478982b4ec2d54ca..85781211bc84dea915dfda4fb17d0c62a71258a3 100644 --- a/pkg/web/sanitizer_test.go +++ b/pkg/web/sanitizer_test.go @@ -148,6 +148,18 @@ func TestSanitizerAllowedTags(t *testing.T) { html, err = renderMarkdown(md, ctx) is.NoErr(err) is.True(strings.Contains(string(html), " +Click to expand + +Hidden content here + +
`) + html, err = renderMarkdown(md, ctx) + is.NoErr(err) + is.True(strings.Contains(string(html), "