diff options
author | 2020-02-03 13:46:27 +0000 | |
---|---|---|
committer | 2020-02-03 13:46:27 +0000 | |
commit | fe77834b662ac53b78174dae819a717b2bd04ccf (patch) | |
tree | 21ec9970bc6892127577d4a22de96f1cd81a1c00 /usr.bin/tmux/input.c | |
parent | use better markup for challenge and write-attestation, (diff) | |
download | wireguard-openbsd-fe77834b662ac53b78174dae819a717b2bd04ccf.tar.xz wireguard-openbsd-fe77834b662ac53b78174dae819a717b2bd04ccf.zip |
Instead of passing titles through vis() which doubles backslashes, just
ignore any containing control characters or invalid UTF-8. GitHub issue 2070.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r-- | usr.bin/tmux/input.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index 6b1d8a27680..ec8bcaf5a3c 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.169 2020/01/29 15:07:49 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.170 2020/02/03 13:46:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -2213,10 +2213,8 @@ input_exit_osc(struct input_ctx *ictx) switch (option) { case 0: case 2: - if (utf8_isvalid(p)) { - screen_set_title(sctx->s, p); + if (screen_set_title(sctx->s, p)) server_status_window(ictx->wp->window); - } break; case 4: input_osc_4(ictx, p); @@ -2274,10 +2272,8 @@ input_exit_apc(struct input_ctx *ictx) return; log_debug("%s: \"%s\"", __func__, ictx->input_buf); - if (!utf8_isvalid(ictx->input_buf)) - return; - screen_set_title(sctx->s, ictx->input_buf); - server_status_window(ictx->wp->window); + if (screen_set_title(sctx->s, ictx->input_buf)) + server_status_window(ictx->wp->window); } /* Rename string started. */ |