diff options
author | Bastien Nocera <hadess@hadess.net> | 2022-05-10 10:51:14 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-05-10 10:52:13 +0200 |
commit | 362f4368e5ec357d560bfcc34a9e56c50a741037 (patch) | |
tree | ab04510745c8ac3744d5cba552a9b6eba960a5b4 /lib | |
parent | 2c53d6bfbb2e6452f3f980cdaba0c5525bd5bdc7 (diff) | |
download | gnome-bluetooth-362f4368e5ec357d560bfcc34a9e56c50a741037.tar.gz |
settings-row: Fix display of devices with & in their names
Escape the device name/alias before using it as a label.
Closes: #115
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bluetooth-settings-row.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bluetooth-settings-row.c b/lib/bluetooth-settings-row.c index 51d509e7..99e1585a 100644 --- a/lib/bluetooth-settings-row.c +++ b/lib/bluetooth-settings-row.c @@ -177,7 +177,10 @@ update_row (BluetoothSettingsRow *self) bluetooth_type_to_string (self->type)); gtk_widget_set_sensitive (GTK_WIDGET (self), FALSE); } else { - adw_preferences_row_set_title (ADW_PREFERENCES_ROW (self), self->alias); + g_autofree char *escaped = NULL; + if (self->alias != NULL) + escaped = g_markup_escape_text (self->alias, -1); + adw_preferences_row_set_title (ADW_PREFERENCES_ROW (self), escaped); gtk_widget_set_sensitive (GTK_WIDGET (self), TRUE); } } |