Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "geocortex/infrastructure/FilterUtils"

Index

Type aliases

UriDetails

Functions

sanitize

  • Sanitize a string of unsafe HTML to eliminate XSS (cross-site scripting) security risks. This method allows tags and standard attributes, however data- attributes are not allowed. Script tags are not allowed either. Note that you must pass a SanitizeOptions.uriTransformer function in the options if you wish to allow URIs in your content.

    Parameters

    • unsafeHtml: string

      String of HTML to be scrubbed clean.

    • Optional options: SanitizeOptions

      .

    Returns string

    Safe HTML that has been sanitized.

stripHtml

  • stripHtml(unsafe: string): string
  • Strip all HTML out of a string.

    Parameters

    • unsafe: string

      String of text which will have its HTML stripped away.

    Returns string

    A plain text string without any HTML markup.