Skip to content

Commit 5ea375a

Browse files
committed
refactor: embed-block の DOMPurify 設定における ADD_ATTR の構成を簡素化
1 parent 190e3ec commit 5ea375a

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

packages/render/src/elements/embed-block.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,7 @@ purify.addHook("uponSanitizeAttribute", (_node, data) => {
9191
const DOMPURIFY_CONFIG: Config = {
9292
ALLOWED_TAGS: ["iframe"],
9393
// Add iframe-specific attributes to the default allowlist
94-
ADD_ATTR: [
95-
"allow",
96-
"allowfullscreen",
97-
"frameborder",
98-
"loading",
99-
"referrerpolicy",
100-
"sandbox",
101-
],
94+
ADD_ATTR: ["allow", "allowfullscreen", "frameborder", "loading", "referrerpolicy", "sandbox"],
10295
// Forbid dangerous attributes
10396
FORBID_ATTR: ["srcdoc", "onload", "onerror", "onclick"],
10497
};

0 commit comments

Comments
 (0)