Sanitize pane titles and window and session names more consistently and

strictly, prevents C0 characters and other nonvisible characters causing
problems. Reported (with a different fix) by Chris Monardo in GitHub
issue 4999.
This commit is contained in:
nicm
2026-04-22 07:10:16 +00:00
parent fee70031f6
commit d339ab51eb
11 changed files with 58 additions and 41 deletions

View File

@@ -5235,7 +5235,7 @@ format_replace(struct format_expand_state *es, const char *key, size_t keylen,
value = format_search(search, wp, new);
}
free(new);
} else if (modifiers & FORMAT_REPEAT) {
} else if (modifiers & FORMAT_REPEAT) {
/* Repeat multiple times. */
if (format_choose(es, copy, &left, &right, 1) != 0) {
format_log(es, "repeat syntax error: %s", copy);
@@ -5254,7 +5254,7 @@ format_replace(struct format_expand_state *es, const char *key, size_t keylen,
}
free(right);
free(left);
} else if (modifiers & FORMAT_NOT) {
} else if (modifiers & FORMAT_NOT) {
value = format_bool_op_1(es, copy, 1);
} else if (modifiers & FORMAT_NOT_NOT) {
value = format_bool_op_1(es, copy, 0);