Skip to content

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Dec 4, 2024

most programs should not give output with ansi sequences to a pipe, but as some of them do, this will strip them out.

closes #188

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 added the enhancement New feature or request label Dec 4, 2024
@caarlos0 caarlos0 self-assigned this Dec 4, 2024
@bashbunni
Copy link
Member

bashbunni commented Dec 9, 2024

less ansi-example.txt | go run . pager gives
image

ansi-example.txt has ansi sequences that are stripped with this change 👍

@caarlos0 caarlos0 merged commit fb543c3 into main Dec 9, 2024
14 checks passed
@caarlos0 caarlos0 deleted the sanitize branch December 9, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sanitize input
3 participants