textsafe

package
v0.1.0-rc.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package textsafe renders untrusted remote text for a terminal.

Raminga treats every remote chat message, peer ID, address, error and diagnostic string as untrusted. Nothing in this package interprets a remote string as an instruction, and the output never contains a raw ESC/BEL or other control byte. ANSI escape sequences are stripped, C0/C1 controls are rendered as visible \xNN / \u{...} escapes, and bidirectional formatting controls are escaped so they cannot reorder trusted text.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Quote

func Quote(s string) string

Quote sanitizes s and wraps it in double quotes, matching the CLI's use of strconv.Quote for untrusted chat/event text.

func Sanitize

func Sanitize(s string) string

Sanitize returns a terminal-safe rendering of s. ANSI escape sequences are removed; every remaining control or format character is escaped. Printable UTF-8 (including non-ASCII text) is preserved.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL