Closed
Description
Windows Terminal version
1.12.3472.0
Windows build number
10.0.19041.1415
Other Software
No response
Steps to reproduce
- Edit the settings.json file.
- Set the default tab title with an escape sequence like this:
"tabTitle": "\u001b[41m"
- Start a cmd shell
Expected Behavior
The escape character should be stripped from the title.
Actual Behavior
The escape character is left in the title when propagated over conpty, so it ends up being interpreted as a background color change in the terminal.
We do already sanitize the title in DoSrvSetConsoleTitleW
, which covers title changes via the console API, but in this case the CONSOLE_INFORMATION::SetTitle
method is being called directly from the AllocateConsole
method on startup:
terminal/src/host/consoleInformation.cpp
Line 130 in 7061c54
My suggestion is we move the sanitization from DoSrvSetConsoleTitleW
into the CONSOLE_INFORMATION::SetTitle
method, so we can be sure it's applied in all cases.
Metadata
Metadata
Assignees
Labels
Down in the muck of API call servicing, interprocess communication, eventing, etc.It either shouldn't be doing this or needs an investigation.It's a new issue that the core contributor team needs to triage at the next triage meetingFor issues in the Console codebaseFix is checked in, but it might be 3-4 weeks until a release.