Config
Unofficial
Configuration options for DOMPurify sanitization.
Import:
import type { Config } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface ConfigProperties
| Property | Type | Description | |
|---|---|---|---|
| ADD_ATTR? | string[] | Additional attributes to allow. | |
| ADD_DATA_URI_TAGS? | string[] | Additional data URI tags to allow. | |
| ADD_TAGS? | string[] | Additional tags to allow. | |
| ADD_URI_SAFE_ATTR? | string[] | Additional URI-safe attributes to allow. | |
| ALLOW_ARIA_ATTR? | boolean | Whether to allow ARIA attributes. | |
| ALLOW_DATA_ATTR? | boolean | Whether to allow data attributes. | |
| ALLOW_UNKNOWN_PROTOCOLS? | boolean | Whether to allow unknown protocols in URLs. | |
| ALLOWED_ATTR? | string[] | List of allowed attributes. | |
| ALLOWED_NAMESPACES? | string[] | List of allowed namespaces. | |
| ALLOWED_TAGS? | string[] | List of allowed tags. | |
| ALLOWED_URI_REGEXP? | RegExp | Regular expression for allowed URI patterns. | |
| CUSTOM_ELEMENT_HANDLING? | CustomElementHandling | Custom element handling configuration. | |
| FORBID_ATTR? | string[] | List of forbidden attributes. | |
| FORBID_CONTENTS? | string[] | List of forbidden content types. | |
| FORBID_TAGS? | string[] | List of forbidden tags. | |
| FORCE_BODY? | boolean | Whether to force the use of the body element. | |
| IN_PLACE? | boolean | Whether to sanitize in place. | |
| KEEP_CONTENT? | boolean | Whether to keep content of removed elements. | |
| NAMESPACE? | string | Namespace for the parsed document. | |
| PARSER_MEDIA_TYPE? | string | Media type for the parser. | |
| RETURN_DOM_FRAGMENT? | boolean | Whether to return a DocumentFragment instead of a string. | |
| RETURN_DOM_IMPORT? | boolean | Whether to import the returned DOM node into the current document. | |
| RETURN_DOM? | boolean | Whether to return a DOM node instead of a string. | |
| RETURN_TRUSTED_TYPE? | boolean | Whether to return a Trusted Type object instead of a string. | |
| SAFE_FOR_TEMPLATES? | boolean | Whether to enable safe-for-templates mode. | |
| SANITIZE_DOM? | boolean | Whether to sanitize DOM clobbering attacks. | |
| SANITIZE_NAMED_PROPS? | boolean | Whether to sanitize named properties. | |
| USE_PROFILES? | ConfigUseProfiles | false | Profiles to use for sanitization. | |
| WHOLE_DOCUMENT? | boolean | Whether to sanitize the whole document. |