Skip to content

bug: Text sanitization inadvertently swallows valid text due to C1 control characters #22616

@euxaristia

Description

@euxaristia

What happened?

The stripUnsafeCharacters utility was sometimes "swallowing" large blocks of valid text. This occurred because the underlying stripVTControlCharacters function was misinterpreting certain C1 control characters (0x80-0x9F) as the start of unterminated escape sequences, causing it to discard all subsequent text in the string.

What did you expect to happen?

Only unsafe or non-printable characters should be removed; all valid user-visible text must be preserved.

Client information

All platforms

Additional context

Resolved by stripping C1 range characters (0x80-0x9F) early in the sanitization pipeline before passing the string to the VT escape sequence stripper.

Metadata

Metadata

Assignees

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions