DOM
sanitize(dirty, options)
Sanitizes DOM content. A wrapper for the dompurify package, pre-configured to allow EDS components. Prevents XSS attacks.
Usage: window.e.utils.v2.dom.sanitize(dirty, options)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dirty | HTMLElement | yes | The HTML content to sanitize |
options | object | no | Settings passed to DOMPurify |
Returns: The sanitized content.