diff --git a/src/markdown/sanitize-schema.ts b/src/markdown/sanitize-schema.ts index 3c20ce00..9123f555 100644 --- a/src/markdown/sanitize-schema.ts +++ b/src/markdown/sanitize-schema.ts @@ -17,39 +17,12 @@ const scheme = { ], attributes: { ...defaultSchema.attributes, - div: [...(defaultSchema.attributes?.div || []), "className", "style", "id"], - img: [ - ...(defaultSchema.attributes?.img || []), - "className", - "style", - "id", - "width", - "height", - ], - code: ["className"], + "*": [...(defaultSchema.attributes?.["*"] || []), "className", "style"], blockquote: allowedBlockquoteAttrs, - video: [ - "className", - "src", - "controls", - "loop", - "muted", - "autoplay", - "playsinline", - ], - audio: ["className", "src", "controls", "loop", "muted", "autoplay"], + video: ["src", "controls", "loop", "muted", "autoPlay", "playsInline"], + audio: ["src", "controls", "loop", "muted", "autoPlay"], source: ["src", "type"], - iframe: [ - "className", - "src", - "allowFullScreen", - "frameborder", - "width", - "height", - "allow", - "style", - ], - span: ["className", "style"], + iframe: ["src", "allowFullScreen", "frameborder", "allow"], }, }