MCPcopy Create free account
hub / github.com/resend/react-email / removeForbiddenElements

Function removeForbiddenElements

packages/editor/src/utils/paste-sanitizer.ts:54–60  ·  view source on GitHub ↗
(root: Element)

Source from the content-addressed store, hash-verified

52}
53
54function removeForbiddenElements(root: Element): void {
55 for (const tag of FORBIDDEN_TAGS) {
56 for (const el of Array.from(root.getElementsByTagName(tag))) {
57 el.remove();
58 }
59 }
60}
61
62function scrubUnsafeUrlAttributes(root: Element): void {
63 for (const el of Array.from(

Callers 1

sanitizePastedHtmlFunction · 0.85

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected