mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Instead of passing titles through vis() which doubles backslashes, just
ignore any containing control characters or invalid UTF-8. GitHub issue 2070.
This commit is contained in:
9
screen.c
9
screen.c
@ -152,11 +152,16 @@ screen_set_cursor_colour(struct screen *s, const char *colour)
|
||||
}
|
||||
|
||||
/* Set screen title. */
|
||||
void
|
||||
int
|
||||
screen_set_title(struct screen *s, const char *title)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
if (!utf8_isvalid(title))
|
||||
return (0);
|
||||
free(s->title);
|
||||
utf8_stravis(&s->title, title, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL);
|
||||
s->title = xstrdup(title);
|
||||
return (1);
|
||||
}
|
||||
|
||||
/* Set screen path. */
|
||||
|
Reference in New Issue
Block a user