Skip to content

fix input escape on preview - #299

Open
aserowy wants to merge 7 commits into
mainfrom
hotfix/296_escape_on_preview
Open

fix input escape on preview#299
aserowy wants to merge 7 commits into
mainfrom
hotfix/296_escape_on_preview

Conversation

@aserowy

@aserowy aserowy commented Apr 14, 2026

Copy link
Copy Markdown
Owner

closes #296

aserowy added 7 commits April 14, 2026 09:33
Signed-off-by: aserowy <alexander.serowy+dots@proton.me>
Sanitize syntax-highlighted preview output by truncating long lines
to viewport width before highlighting and stripping non-SGR escape
sequences. Extract shared strip_non_sgr_escape_sequences to a
dedicated sanitize module used by both chafa and syntax highlight paths.
Remove pre-highlight line truncation that corrupts syntect parser state,
causing style bleed on lines after truncated string literals.
…escape chars, real issue is untruncated 517K line
Signed-off-by: aserowy <alexander.serowy+dots@proton.me>
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.

previewing asset/icon.svg escapes input to stdout which allows rce (critical!)

1 participant