Setu-TS
    Preparing search index...

    Interface SanitizationRules

    Configuration for sanitizing a string value.

    All options are optional and composable. When multiple options are enabled they are applied in a fixed, deterministic order: trim → case → pattern → stripTags → htmlEncode → maxLength.

    0.1.0

    interface SanitizationRules {
        allowedTags?: string[];
        htmlEncode?: boolean;
        maxLength?: number;
        pattern?: RegExp;
        stripTags?: boolean;
        toLowerCase?: boolean;
        toUpperCase?: boolean;
        trim?: boolean;
    }
    Index
    allowedTags?: string[]

    Keep only the listed tag names (implies stripTags for non-listed tags).

    htmlEncode?: boolean

    Encode HTML entities (<, >, &, ", ').

    maxLength?: number

    Truncate the string to this many characters (applied after other transforms).

    pattern?: RegExp

    Replace the entire string with an empty string if it does not match.

    stripTags?: boolean

    Remove all HTML tags.

    toLowerCase?: boolean

    Convert the string to lowercase.

    toUpperCase?: boolean

    Convert the string to uppercase.

    trim?: boolean

    Trim leading and trailing whitespace.