Support <details> collapsing in markdown

The markdown sanitizer's allowlist did not include the <details> and
<summary> 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
<details open> starts expanded.

Closes 390f3f2958
This commit is contained in:
andreolf
2026-08-25 11:05:44 +02:00
committed by Rūdolfs Ošiņš
parent 96730dc1f4
commit fc31f33fad
+3
View File
@@ -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",