A class to sanitize HTML strings.

Implements

Constructors

Properties

_allowNamedProperties: boolean = false
_autolink: boolean = true
_customAllowedSchemes: undefined | string[]
_options: IOptions

Methods

  • Set the whether to allow name and id attributes.

    Parameters

    • allowNamedProperties: boolean

    Returns void

  • Set the allowed schemes

    Parameters

    • scheme: string[]

      Allowed schemes. Automatically regenerates sanitizer options to apply the change. Note: the schemes merge into the current config and does not get overwritten.

    Returns void