Expand description
Text and links made safe to write to a terminal, which interprets the escape sequences an untrusted input can carry.
Functionsยง
- lines
textfor a message of several lines: the newlines are kept.- link
- The OSC 8 target for a link, or
Nonewhen the link must not be clickable: longer than 2,048 bytes, with a scheme other than http, https, mailto and file (so relative paths andjavascript:are dropped), or afile:link to another host. - text
- The text with every character a terminal could interpret or that disguises text removed: C0 and C1 controls, DEL, bidi marks, overrides and isolates, the zero-width space, the word joiner and the invisible format characters around it, the byte order mark and tag characters. A tab becomes spaces, the line and paragraph separators a space.