fix: sanitize schema video and audio autoPlay and playsInline
This commit is contained in:
parent
e17ee61326
commit
8f4adbd2bc
|
|
@ -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"],
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue