mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-06 23:21:16 +08:00
Allow iframe embeds in markdown sanitizer
This commit is contained in:
@@ -157,6 +157,7 @@ const SANITIZE_CFG = {
|
||||
'th',
|
||||
'video',
|
||||
'source',
|
||||
'iframe',
|
||||
],
|
||||
// 允许的属性
|
||||
allowedAttributes: {
|
||||
@@ -180,6 +181,16 @@ const SANITIZE_CFG = {
|
||||
'crossorigin',
|
||||
],
|
||||
source: ['src', 'type'],
|
||||
iframe: [
|
||||
'src',
|
||||
'title',
|
||||
'width',
|
||||
'height',
|
||||
'allow',
|
||||
'allowfullscreen',
|
||||
'frameborder',
|
||||
'referrerpolicy',
|
||||
],
|
||||
},
|
||||
// 允许的类名(保留你的样式钩子)
|
||||
allowedClasses: {
|
||||
|
||||
Reference in New Issue
Block a user