fix: sanitize schema video and audio autoPlay and playsInline

This commit is contained in:
DIYgod 2023-04-06 16:11:54 +01:00
parent e17ee61326
commit 8f4adbd2bc
No known key found for this signature in database
1 changed files with 4 additions and 31 deletions

View File

@ -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"],
},
}