Skip to main content

Module sanitize

Module sanitize 

Source
Expand description

Neutralise terminal control sequences in repository-provided text.

Author names and commit messages come from the repository (possibly a cloned, untrusted one). Printing them raw would let embedded escape sequences retitle, recolour or clear the user’s terminal.

Functions§

safe
Replace control characters (other than tab and newline) with visible escapes.