mimekit-ts - v1.0.0
    Preparing search index...

    Class HtmlToHtml

    An HTML to HTML converter.

    Used to convert HTML into HTML.

    Hierarchy (View Summary)

    Index
    filterComments: boolean = false

    Gets or sets whether the converter should remove HTML comments from the output.

    filterHtml: boolean = false

    Gets or sets whether undesirable tags should be stripped from the output.

    This is an incomplete solution for protecting against Cross-Site Scripting (XSS) attacks and should not be relied upon as a comprehensive security measure. It only removes certain known dangerous or undesirable HTML tags and does not validate attribute values, filter event handler attributes, sanitize inline CSS, or protect against newly discovered XSS techniques. For robust XSS protection, pass the HTML output through a dedicated sanitizer library.

    footerFormat: HeaderFooterFormat = HeaderFooterFormat.Text

    Gets or sets the footer format.

    headerFormat: HeaderFooterFormat = HeaderFooterFormat.Text

    Gets or sets the header format.

    htmlTagCallback: HtmlTagCallback | null = null

    Gets or sets the callback used for custom filtering of HTML tags and content.

    detectEncodingFromByteOrderMark: boolean = false

    Gets or sets whether byte input encoding is detected from the byte order mark or determined by inputEncoding.

    header: string | null = null

    Gets or sets text prepended to the beginning of the output.

    The header must be set before conversion begins.

    footer: string | null = null

    Gets or sets text appended to the end of the output.

    The footer must be set before conversion begins.

    • get inputStreamBufferSize(): number

      Gets or sets the input stream buffer size.

      Returns number

      value is less than or equal to zero.

    • set inputStreamBufferSize(value: number): void

      Parameters

      • value: number

      Returns void

    • get outputStreamBufferSize(): number

      Gets or sets the output stream buffer size.

      Returns number

      value is less than or equal to zero.

    • set outputStreamBufferSize(value: number): void

      Parameters

      • value: number

      Returns void

    • Converts source text from the input format to the output format and writes the result.

      Parameters

      • source: string | Uint8Array<ArrayBufferLike> | Stream

        The source text, bytes, or stream.

      • writer: TextWriter

        The text writer.

      Returns void

      source or writer is null or undefined.

    • Converts source text from the input format to the output format and writes the result to a stream.

      Parameters

      • source: string | Uint8Array<ArrayBufferLike> | Stream

        The source text, bytes, or stream.

      • destination: Stream

        The destination stream.

      Returns void

      destination is null or undefined.

    • Converts text from the input format to the output format.

      Parameters

      • text: string | Uint8Array<ArrayBufferLike> | Stream

        The text, bytes, or stream to convert.

      Returns string

      The converted text.

      text is null or undefined.