File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 22 * Sanitizes text for one or more filter arguments by replacing symbols `:|{}()<>`
33 * with their corresponding HTML-encoded strings (hexadecimal).
44 *
5+ * When multiple arguments are provided, they are sanitized separately and then joined with `:`.
6+ *
7+ * Using this function on the same text multiple times will sanitize the text only once.
8+ *
59 * @param args
610 * Filter argument(s) text to be sanitized.
711 *
812 * @returns
913 * Sanitized string that's safe to use as a filter argument.
10- * When more than one argument is provided, they are joined with `:`.
1114 *
1215 * @example
1316 * import {sanitizeFilterArgs} from 'custom-string-formatter';
1417 *
1518 * sanitizeFilterArgs('some (text)'); //=> some (text)
1619 *
20+ * @example
21+ * import {sanitizeFilterArgs} from 'custom-string-formatter';
22+ *
23+ * sanitizeFilterArgs('hello', 'there :)'); //=> hello:there :)
24+ *
1725 * @see {@link decodeFilterArg }
1826 */
1927export function sanitizeFilterArgs ( ...args : string [ ] ) : string {
You can’t perform that action at this time.
0 commit comments