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.
Filter argument(s) text to be sanitized.
Sanitized string that's safe to use as a filter argument.
import {sanitizeFilterArgs} from 'custom-string-formatter';sanitizeFilterArgs('some (text)'); //=> some (text) Copy
import {sanitizeFilterArgs} from 'custom-string-formatter';sanitizeFilterArgs('some (text)'); //=> some (text)
import {sanitizeFilterArgs} from 'custom-string-formatter';sanitizeFilterArgs('hello', 'there :)'); //=> hello:there :) Copy
import {sanitizeFilterArgs} from 'custom-string-formatter';sanitizeFilterArgs('hello', 'there :)'); //=> hello:there :)
decodeFilterArg
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.