Skip to content

fix(output): strip terminal controls from tables - #75

Open
efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/safe-table-output
Open

efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/safe-table-output

Conversation

@efegokdemir

Copy link
Copy Markdown
Contributor

Table headers and cells could pass terminal control characters and bidi overrides to stdout. Strip them before formatting, while retaining printable Unicode, newlines and tabs. Render from copies so source values and JSON/CSV exports retain their original text; regression tests cover direct tables and queries through a local HTTP server.

Tested on macOS arm64 with Go 1.27.1: go test -race -count=1 ./..., go vet ./..., go build ./..., gofmt -l . and git diff --check passed. The control-character regressions failed before the fix. Linux CI and the GoReleaser snapshot have not been run locally.

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