Custom String Formatter API
    Preparing search index...

    Function sanitizeFilterArgs

    • Sanitizes text for one or more filter arguments by replacing symbols :|{}()<> with their corresponding HTML-encoded strings (hexadecimal).

      When multiple arguments are provided, they are sanitized separately and then joined with :.

      Using this function on the same text multiple times will sanitize the text only once.

      Parameters

      • ...args: string[]

        Filter argument(s) text to be sanitized.

      Returns string

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

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

      sanitizeFilterArgs('some (text)'); //=> some &#x28;text&#x29;
      import {sanitizeFilterArgs} from 'custom-string-formatter';

      sanitizeFilterArgs('hello', 'there :)'); //=> hello:there &#x3a;&#x29;