mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-18 19:30:27 +08:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user