@mathjax/src
    Preparing search index...

    Class Safe<N, T, D>

    The Safe object for sanitizing the internal MathML representation of an expression

    Type Parameters

    • N

      The HTMLElement node class

    • T

      The Text node class

    • D

      The Document class

    Index
    adaptor: DOMAdaptor<N, T, D>

    The DOM adaptor from the document

    allow: OptionList

    Shorthand for options.allow

    filterAttributes: Map<string, string> = ...

    The attribute-to-filter-method mapping

    filterMethods: { [name: string]: FilterFunction<N, T, D> } = ...

    The methods for filtering the MathML attributes

    options: OptionList

    The safe options from the document option list

    OPTIONS: {
        allow: {
            classes: SAFE_ALLOW;
            cssIDs: SAFE_ALLOW;
            styles: SAFE_ALLOW;
            URLs: SAFE_ALLOW;
        };
        classPattern: RegExp;
        dataPattern: RegExp;
        idPattern: RegExp;
        lengthMax: number;
        safeProtocols: SAFE_LIST;
        safeStyles: SAFE_LIST;
        scriptlevelRange: [number, number];
        scriptsizemultiplierRange: [number, number];
        styleLengths: LENGTH_LIST;
        styleParts: SAFE_LIST;
    } = options

    The options controlling the handling of the safe extension

    • Sanitize a MathML input attribute

      Parameters

      • id: string

        The name of the attribute

      • value: string

        The value of the attribute

      Returns string

      The sanitized value

    • Sanitize a list of class names

      Parameters

      • list: string[]

        The list of class names

      Returns string[]

      The sanitized list