A class to sanitize HTML strings.

Implements

Constructors

Accessors

Methods

  • Set whether to allow command linker attributes.

    Parameters

    • allowCommandLinker: boolean

      Whether to allow command linker attributes.

    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

  • Set the whether to allow name and id attributes.

    Parameters

    • allowNamedProperties: boolean

    Returns void

  • Set whether URLs are auto-linked incrementally (asynchronously, across animation frames) rather than in a single synchronous pass.

    Disabling this also disables incremental rendering of the text output (it is rendered synchronously in a single blocking pass).

    Parameters

    • incrementalAutolink: boolean

      Whether to auto-link incrementally.

    Returns void