aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-12-17 10:01:17 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-12-17 10:01:17 +0000
commitd523e7a676d6d2cdda0369fac3dc9f953d3a4e96 (patch)
tree83e918c6a0f53c7c05f9350be818bbc456666e14 /terminal.c
parentbox-drawings: implement octants (diff)
term: set_app_id() + set_window_title(): only allow printable characters
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/terminal.c b/terminal.c
index 5532972e..a4963bc8 100644
--- a/terminal.c
+++ b/terminal.c
@@ -3570,7 +3570,7 @@ term_set_window_title(struct terminal *term, const char *title)
if (term->window_title != NULL && streq(term->window_title, title))
return;
- if (!is_valid_utf8(title)) {
+ if (!is_valid_utf8_and_printable(title)) {
/* It's an xdg_toplevel::set_title() protocol violation to set
a title with an invalid UTF-8 sequence */
LOG_WARN("%s: title is not valid UTF-8, ignoring", title);
@@ -3593,7 +3593,7 @@ term_set_app_id(struct terminal *term, const char *app_id)
if (term->app_id != NULL && app_id != NULL && streq(term->app_id, app_id))
return;
- if (app_id != NULL && !is_valid_utf8(app_id)) {
+ if (app_id != NULL && !is_valid_utf8_and_printable(app_id)) {
LOG_WARN("%s: app-id is not valid UTF-8, ignoring", app_id);
return;
}