Skip to content

Strip control characters from forge-sourced text#74

Merged
andrew merged 1 commit intomainfrom
fix/output-terminal-escape
May 2, 2026
Merged

Strip control characters from forge-sourced text#74
andrew merged 1 commit intomainfrom
fix/output-terminal-escape

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented May 2, 2026

Issue/PR titles, bodies, comments, labels, release tags, and other forge-sourced strings could contain ANSI escape or OSC sequences that manipulate the terminal (spoofed output, title changes, clipboard writes on terminals with OSC 52 enabled).

Adds `output.Sanitize()` which strips C0 control bytes except tab and newline, and applies it to all display paths in the issue, PR, release, and repo CLI commands. JSON output is unaffected since `encoding/json` already escapes control bytes.

Issue/PR titles, bodies, comments, labels, and other forge-sourced
strings could contain ANSI escape sequences or OSC commands that
manipulate the terminal when displayed. Adds output.Sanitize() to
strip C0 control bytes (except tab and newline) and applies it to
all display paths in the CLI.
@andrew andrew merged commit 032a652 into main May 2, 2026
4 checks passed
@andrew andrew deleted the fix/output-terminal-escape branch May 2, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant