diff options
author | nicm <nicm> | 2020-02-03 13:46:27 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-02-03 13:46:27 +0000 |
commit | 265164d251f427bf9275c355a4f205c781d70b20 (patch) | |
tree | 9ddc4dee575a2d99de8347a5407dcc9a45d4b305 /input.c | |
parent | 87bcc0c7e0fa0aded9a05093caaf22f3a080753d (diff) | |
download | rtmux-265164d251f427bf9275c355a4f205c781d70b20.tar.gz rtmux-265164d251f427bf9275c355a4f205c781d70b20.tar.bz2 rtmux-265164d251f427bf9275c355a4f205c781d70b20.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 'input.c')
-rw-r--r-- | input.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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. */ |