MCPcopy
hub / github.com/resend/react-email / sanitizeNode

Function sanitizeNode

packages/editor/src/utils/paste-sanitizer.ts:86–95  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

84}
85
86function sanitizeNode(node: Node): void {
87 if (node.nodeType === Node.ELEMENT_NODE) {
88 const el = node as HTMLElement;
89 sanitizeElement(el);
90 }
91
92 for (const child of Array.from(node.childNodes)) {
93 sanitizeNode(child);
94 }
95}
96
97function sanitizeElement(el: HTMLElement): void {
98 const tagName = el.tagName.toLowerCase();

Callers 1

sanitizePastedHtmlFunction · 0.85

Calls 2

sanitizeElementFunction · 0.85
fromMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…