pub fn sanitize_for_terminal(text: &str) -> StringExpand description
Makes untrusted text safe to print: control characters other than \n and \t (ESC, CR,
BEL, C1 controls, …) are replaced by their visible \u{…} escape, so they cannot drive the
terminal (cursor moves, OSC 52 clipboard writes, title changes, overwriting lines).