Skip to main content

sanitize_text

Function sanitize_text 

Source
pub fn sanitize_text(text: &str) -> String
Expand description

Remove ANSI escapes and control characters from untrusted text so rendering it cannot alter terminal state. Line breaks and tabs collapse to single spaces.