Options
All
  • Public
  • Public/Protected
  • All
Menu

xss

author

Zongmin Leileizongmin@gmail.com

Index

Type Aliases

EscapeHandler: XSS.EscapeHandler
OnTagAttrHandler: XSS.OnTagAttrHandler
OnTagHandler: XSS.OnTagHandler
SafeAttrValueHandler: XSS.SafeAttrValueHandler

Variables

attributeWrapSign: string
cssFilter: "xss".ICSSFilter
whiteList: "xss".IWhiteList

Functions

  • StripTagBody(tags: string[], next: (() => void)): { onIgnoreTag: any; remove: any }
  • Parameters

    • tags: string[]
    • next: (() => void)
        • (): void
        • Returns void

    Returns { onIgnoreTag: any; remove: any }

    • onIgnoreTag:function
      • onIgnoreTag(tag: string, html: string, options: { isClosing: boolean; position: number }): string
      • Parameters

        • tag: string
        • html: string
        • options: { isClosing: boolean; position: number }
          • isClosing: boolean
          • position: number

        Returns string

    • remove:function
      • remove(html: string): string
      • Parameters

        • html: string

        Returns string

  • clearNonPrintableCharacter(str: string): string
  • Parameters

    • str: string

    Returns string

  • escapeAttrValue(str: string): string
  • Parameters

    • str: string

    Returns string

  • escapeDangerHtml5Entities(str: string): string
  • Parameters

    • str: string

    Returns string

  • escapeHtml(str: string): string
  • Parameters

    • str: string

    Returns string

  • escapeHtmlEntities(str: string): string
  • Parameters

    • str: string

    Returns string

  • escapeQuote(str: string): string
  • Parameters

    • str: string

    Returns string

  • friendlyAttrValue(str: string): string
  • Parameters

    • str: string

    Returns string

  • onIgnoreTag(tag: string, html: string, options: { isClosing?: boolean; isWhite?: boolean; position?: number; sourcePosition?: number }): string | void
  • Parameters

    • tag: string
    • html: string
    • options: { isClosing?: boolean; isWhite?: boolean; position?: number; sourcePosition?: number }
      • Optional isClosing?: boolean
      • Optional isWhite?: boolean
      • Optional position?: number
      • Optional sourcePosition?: number

    Returns string | void

  • onIgnoreTagAttr(tag: string, name: string, value: string, isWhiteAttr: boolean): string | void
  • Parameters

    • tag: string
    • name: string
    • value: string
    • isWhiteAttr: boolean

    Returns string | void

  • onIgnoreTagStripAll(): string
  • Returns string

  • onTag(tag: string, html: string, options: { isClosing?: boolean; isWhite?: boolean; position?: number; sourcePosition?: number }): string | void
  • Parameters

    • tag: string
    • html: string
    • options: { isClosing?: boolean; isWhite?: boolean; position?: number; sourcePosition?: number }
      • Optional isClosing?: boolean
      • Optional isWhite?: boolean
      • Optional position?: number
      • Optional sourcePosition?: number

    Returns string | void

  • onTagAttr(tag: string, name: string, value: string, isWhiteAttr: boolean): string | void
  • Parameters

    • tag: string
    • name: string
    • value: string
    • isWhiteAttr: boolean

    Returns string | void

  • parseAttr(html: string, onAttr: ((name: string, value: string) => string)): string
  • Parameters

    • html: string
    • onAttr: ((name: string, value: string) => string)
        • (name: string, value: string): string
        • Parameters

          • name: string
          • value: string

          Returns string

    Returns string

  • parseTag(html: string, onTag: ((sourcePosition: number, position: number, tag: string, html: string, isClosing: boolean) => string), escapeHtml: XSS.EscapeHandler): string
  • Parameters

    • html: string
    • onTag: ((sourcePosition: number, position: number, tag: string, html: string, isClosing: boolean) => string)
        • (sourcePosition: number, position: number, tag: string, html: string, isClosing: boolean): string
        • Parameters

          • sourcePosition: number
          • position: number
          • tag: string
          • html: string
          • isClosing: boolean

          Returns string

    • escapeHtml: XSS.EscapeHandler

    Returns string

  • safeAttrValue(tag: string, name: string, value: string, cssFilter: XSS.ICSSFilter): string
  • Parameters

    Returns string

  • stripBlankChar(str: string): string
  • Parameters

    • str: string

    Returns string

  • stripCommentTag(str: string): string
  • Parameters

    • str: string

    Returns string

  • unescapeQuote(str: string): string
  • Parameters

    • str: string

    Returns string

Generated using TypeDoc