Skip to content

Commit c1fe5a8

Browse files
committed
Allow iframe in sanitized HTML
1 parent 0616ea6 commit c1fe5a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

resources/js/utils/sanitize.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import DOMPurify from 'dompurify';
33
export function sanitize(html: string | null) {
44
return html
55
? DOMPurify.sanitize(html, {
6+
ADD_TAGS: ['iframe'],
67
CUSTOM_ELEMENT_HANDLING: {
78
tagNameCheck: () => true,
89
attributeNameCheck: () => true,
9-
}
10+
},
1011
})
1112
: html;
1213
}

0 commit comments

Comments
 (0)