Skip to main content

sanitize

Function sanitize 

Source
pub fn sanitize(text: &str) -> Cow<'_, str>
Expand description

Prepares text for display inside a box: control characters (except \n and \t) become U+FFFD and emoji are normalised with normalize_emoji.

Text that is printed verbatim may contain file names or user names; this keeps a stray ESC from being interpreted by the terminal.