pub fn sanitize(text: &str) -> String
text with every character a terminal could act on removed. \r\n becomes \n; a lone \r is dropped.
text
\r\n
\n
\r