Custom String Formatter API
    Preparing search index...

    Function sanitizeFilterArg

    • Sanitizes a filter-argument text by replacing symbols :|{}()<> with their corresponding HTML-encoded strings (hexadecimal).

      Parameters

      • arg: string

        Filter argument text to be sanitized.

      Returns string

      Sanitized string that's safe to use as a filter argument.

      import {sanitizeFilterArg} from 'custom-string-formatter';

      sanitizeFilterArg('some (text)'); //=> some &#x28;text&#x29;