pub fn redact_text(text: &str, secrets: &[String]) -> StringExpand description
Replace every occurrence of a secret in text with the marker.
The rule is unconditional, including for one- and two-byte secrets: a short secret that survives inside a note would be stored in the canonical image and then hidden only by the projections, so the copy has to go at the source. The cost is cosmetic (a pathological one-character secret redacts a lot of text); the alternative is a leak.