Runs text through a configurable pipeline of existing textConvert
functions -- trimming, whitespace normalization, PII/secret redaction,
and HTML escaping -- for the common "clean this user input/log line
before it's stored or displayed" case.
This is composition, not new detection logic: every step just calls
the same underlying function (normalizeWhitespace,
redact, escapeHtml) that already exists standalone, in
a fixed order regardless of the order options are given in:
trim -> normalizeWhitespace -> redactPII -> escapeHtml.
Redaction deliberately runs on the raw, unescaped text -- so pattern
matching isn't affected by HTML-escaped characters -- and escaping
always runs last, so the final output is safe to render no matter
which other steps ran.
Runs
textthrough a configurable pipeline of existing textConvert functions -- trimming, whitespace normalization, PII/secret redaction, and HTML escaping -- for the common "clean this user input/log line before it's stored or displayed" case.This is composition, not new detection logic: every step just calls the same underlying function (normalizeWhitespace, redact, escapeHtml) that already exists standalone, in a fixed order regardless of the order options are given in:
trim->normalizeWhitespace->redactPII->escapeHtml.Redaction deliberately runs on the raw, unescaped text -- so pattern matching isn't affected by HTML-escaped characters -- and escaping always runs last, so the final output is safe to render no matter which other steps ran.