From fc31f33fad245a993076df9aa53b52d811e7670a Mon Sep 17 00:00:00 2001 From: andreolf Date: Mon, 24 Aug 2026 17:24:49 +0200 Subject: [PATCH] Support
collapsing in markdown The markdown sanitizer's allowlist did not include the
and tags, so GitHub-style collapsible sections were stripped and their contents rendered flat. Add both tags to ALLOWED_TAGS and the "open" attribute to ALLOWED_ATTR, so collapsible sections render and
starts expanded. Closes 390f3f295881bfc418eafd3532ea326fe365c7a2 --- src/lib/markdown.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/markdown.ts b/src/lib/markdown.ts index 430af0b56..32d1d8d8d 100644 --- a/src/lib/markdown.ts +++ b/src/lib/markdown.ts @@ -30,6 +30,7 @@ export const sanitizeConfig: Config = { "href", "id", "name", + "open", "rel", "src", "target", @@ -46,6 +47,7 @@ export const sanitizeConfig: Config = { "code", "dd", "del", + "details", "div", "dl", "dt", @@ -67,6 +69,7 @@ export const sanitizeConfig: Config = { "radicle-external-link", "s", "strong", + "summary", "table", "tbody", "td",