From 2630f18631aa1f8964c4e1f25aa3ce62df7e44bf Mon Sep 17 00:00:00 2001 From: fiaxh Date: Fri, 5 Mar 2021 11:46:51 -0600 Subject: Escape pango markup in names in GlobalSearch --- main/src/ui/global_search.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/ui/global_search.vala b/main/src/ui/global_search.vala index c64845e4..0d6341cc 100644 --- a/main/src/ui/global_search.vala +++ b/main/src/ui/global_search.vala @@ -96,7 +96,7 @@ public class GlobalSearch : Overlay { avatar.set_conversation(stream_interactor, suggestion.conversation); } if (display_name != suggestion.jid.to_string()) { - label.set_markup(@"$display_name $(suggestion.jid)"); + label.set_markup("%s %s".printf(Markup.escape_text(display_name), Markup.escape_text(suggestion.jid.to_string()))); } else { label.label = display_name; } @@ -257,7 +257,7 @@ public class GlobalSearch : Overlay { string display_name = Util.get_participant_display_name(stream_interactor, item.conversation, item.jid); string color = Util.get_name_hex_color(stream_interactor, item.message.account, item.jid, false); // TODO Util.is_dark_theme(name_label) Label name_label = new Label("") { ellipsize=EllipsizeMode.END, use_markup=true, xalign=0, visible=true }; - name_label.label = @"$display_name"; + name_label.label = "%s".printf(color, Markup.escape_text(display_name)); grid.attach(name_label, 1, 0, 1, 1); return grid; } -- cgit v1.2.3-70-g09d2