From 5dc8448b3246c119b12b3cc221cc2d53f00529fd Mon Sep 17 00:00:00 2001 From: Dino Date: Sun, 1 Nov 2026 19:34:02 -0500 Subject: [PATCH] gtk clients: fix problem with & char in strings RM #607 --- client/gui-gtk-3.22/citydlg.c | 12 +++++++----- client/gui-gtk-3.22/cityrep.c | 8 ++++++-- client/gui-gtk-3.22/diplodlg.c | 15 +++++++++++---- client/gui-gtk-3.22/plrdlg.c | 5 +++-- client/gui-gtk-3.22/repodlgs.c | 8 ++++++-- client/gui-gtk-4.0/citydlg.c | 12 +++++++----- client/gui-gtk-4.0/diplodlg.c | 15 +++++++++++---- client/gui-gtk-4.0/plrdlg.c | 5 +++-- client/gui-gtk-4.0/repodlgs.c | 8 ++++++-- client/gui-gtk-5.0/citydlg.c | 12 +++++++----- client/gui-gtk-5.0/diplodlg.c | 15 +++++++++++---- client/gui-gtk-5.0/plrdlg.c | 5 +++-- client/gui-gtk-5.0/repodlgs.c | 8 ++++++-- 13 files changed, 87 insertions(+), 41 deletions(-) diff --git a/client/gui-gtk-3.22/citydlg.c b/client/gui-gtk-3.22/citydlg.c index 698dfb4b10..47ee2af3ab 100644 --- a/client/gui-gtk-3.22/citydlg.c +++ b/client/gui-gtk-3.22/citydlg.c @@ -1832,32 +1832,34 @@ static void city_dialog_update_title(struct city_dialog *pdialog) { gchar *buf; const gchar *now; + const char * city_name = city_name_getx(pdialog->pcity); + gchar *escaped_city_name = g_markup_escape_text(city_name, -1);; if (city_unhappy(pdialog->pcity)) { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens - DISORDER"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } else if (city_celebrating(pdialog->pcity)) { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens - celebrating"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } else if (city_happy(pdialog->pcity)) { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens - happy"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } else { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } now = gtk_label_get_text(GTK_LABEL(pdialog->name_label)); if (strcmp(now, buf) != 0) { - gtk_window_set_title(GTK_WINDOW(pdialog->shell), city_name_getx(pdialog->pcity)); + gtk_window_set_title(GTK_WINDOW(pdialog->shell), city_name); gtk_label_set_markup(GTK_LABEL(pdialog->name_label), buf); } diff --git a/client/gui-gtk-3.22/cityrep.c b/client/gui-gtk-3.22/cityrep.c index dda8ff57bc..23b47eb42e 100644 --- a/client/gui-gtk-3.22/cityrep.c +++ b/client/gui-gtk-3.22/cityrep.c @@ -330,6 +330,8 @@ static void append_impr_or_unit_to_menu_item(GtkMenuItem *parent_item, int i, item, targets_used; char *row[4]; char buf[4][64]; + char *item_text; + gchar *escaped_item_text; GtkSizeGroup *group[3]; const char *markup[3] = { @@ -402,15 +404,17 @@ static void append_impr_or_unit_to_menu_item(GtkMenuItem *parent_item, for (i = 0; i < 3; i++) { if (row[i][0] == '\0') { - continue; + continue; } if (city_operation == CO_SELL && i != 0) { continue; } + item_text = row[i]; + escaped_item_text = g_markup_escape_text(item_text, -1); fc_snprintf(txt, ARRAY_SIZE(txt), "%s", - markup[i], row[i]); + markup[i], escaped_item_text); label = gtk_label_new(NULL); gtk_label_set_markup(GTK_LABEL(label), txt); diff --git a/client/gui-gtk-3.22/diplodlg.c b/client/gui-gtk-3.22/diplodlg.c index f837f3fba3..67451ad8fd 100644 --- a/client/gui-gtk-3.22/diplodlg.c +++ b/client/gui-gtk-3.22/diplodlg.c @@ -698,6 +698,7 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, GtkListStore *store; GtkCellRenderer *rend; int i; + gchar *escaped; struct Diplomacy_dialog *pdialog; char plr_buf[4 * MAX_LEN_NAME]; @@ -765,8 +766,9 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, label = gtk_label_new(NULL); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text(nation_plural_for_player(plr0), -1); buf = g_strdup_printf("%s", - nation_plural_for_player(plr0)); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_container_add(GTK_CONTAINER(vbox), label); @@ -786,8 +788,10 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, gtk_widget_set_hexpand(label, TRUE); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text( + ruler_title_for_player(plr0, plr_buf, sizeof(plr_buf)), -1); buf = g_strdup_printf("%s", - ruler_title_for_player(plr0, plr_buf, sizeof(plr_buf))); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_container_add(GTK_CONTAINER(hbox), label); @@ -847,8 +851,9 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, label = gtk_label_new(NULL); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text(nation_plural_for_player(plr1), -1); buf = g_strdup_printf("%s", - nation_plural_for_player(plr1)); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_container_add(GTK_CONTAINER(vbox), label); @@ -868,8 +873,10 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, gtk_widget_set_hexpand(label, TRUE); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text( + title_for_player(plr1, plr_buf, sizeof(plr_buf)), -1); buf = g_strdup_printf("%s", - title_for_player(plr1, plr_buf, sizeof(plr_buf))); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_container_add(GTK_CONTAINER(hbox), label); diff --git a/client/gui-gtk-3.22/plrdlg.c b/client/gui-gtk-3.22/plrdlg.c index be823ff8ab..a164250638 100644 --- a/client/gui-gtk-3.22/plrdlg.c +++ b/client/gui-gtk-3.22/plrdlg.c @@ -652,6 +652,8 @@ static void fill_row(GtkListStore *store, GtkTreeIter *it, GdkPixbuf *pixbuf; int style = PANGO_STYLE_NORMAL, weight = PANGO_WEIGHT_NORMAL; int k; + const char * score_tt = score_tooltip(pplayer, pplayer->score.game); + gchar *escaped_score_tt = g_markup_escape_text(score_tt, -1); for (k = 0; k < num_player_dlg_columns; k++) { pcol = &player_dlg_columns[k]; @@ -680,8 +682,7 @@ static void fill_row(GtkListStore *store, GtkTreeIter *it, } } - gtk_list_store_set(store, it, PLR_DLG_COL_TOOLTIP, - score_tooltip(pplayer, pplayer->score.game), -1); + gtk_list_store_set(store, it, PLR_DLG_COL_TOOLTIP, escaped_score_tt, -1); /* Now add some eye candy ... */ if (client_has_player()) { diff --git a/client/gui-gtk-3.22/repodlgs.c b/client/gui-gtk-3.22/repodlgs.c index c73272e28f..e7d790d142 100644 --- a/client/gui-gtk-3.22/repodlgs.c +++ b/client/gui-gtk-3.22/repodlgs.c @@ -1921,13 +1921,17 @@ void endgame_report_dialog_player(const struct packet_endgame_player *packet) const struct player *pplayer = player_by_number(packet->player_id); GtkTreeIter iter; int i; + const char * player_nm = player_name(pplayer); + gchar *escaped_player_nm = g_markup_escape_text(player_nm, -1); + const char * score_tt = score_tooltip(pplayer, pplayer->score.game); + gchar *escaped_score_tt = g_markup_escape_text(score_tt, -1); gtk_list_store_append(preport->store, &iter); gtk_list_store_set(preport->store, &iter, - FRD_COL_PLAYER, player_name(pplayer), + FRD_COL_PLAYER, escaped_player_nm, FRD_COL_NATION, get_flag(nation_of_player(pplayer)), FRD_COL_SCORE, packet->score, - FRD_COL_TOOLTIP, score_tooltip(pplayer, packet->score), + FRD_COL_TOOLTIP, escaped_score_tt, -1); for (i = 0; i < packet->category_num; i++) { gtk_list_store_set(preport->store, &iter, diff --git a/client/gui-gtk-4.0/citydlg.c b/client/gui-gtk-4.0/citydlg.c index 61fcae210a..283e6ae64d 100644 --- a/client/gui-gtk-4.0/citydlg.c +++ b/client/gui-gtk-4.0/citydlg.c @@ -1768,32 +1768,34 @@ static void city_dialog_update_title(struct city_dialog *pdialog) { gchar *buf; const gchar *now; + const char * city_name = city_name_getx(pdialog->pcity); + gchar *escaped_city_name = g_markup_escape_text(city_name, -1);; if (city_unhappy(pdialog->pcity)) { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens - DISORDER"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } else if (city_celebrating(pdialog->pcity)) { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens - celebrating"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } else if (city_happy(pdialog->pcity)) { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens - happy"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } else { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } now = gtk_label_get_text(GTK_LABEL(pdialog->name_label)); if (strcmp(now, buf) != 0) { - gtk_window_set_title(GTK_WINDOW(pdialog->shell), city_name_getx(pdialog->pcity)); + gtk_window_set_title(GTK_WINDOW(pdialog->shell), city_name); gtk_label_set_markup(GTK_LABEL(pdialog->name_label), buf); } diff --git a/client/gui-gtk-4.0/diplodlg.c b/client/gui-gtk-4.0/diplodlg.c index bbe2b0dea1..6bea5fb6af 100644 --- a/client/gui-gtk-4.0/diplodlg.c +++ b/client/gui-gtk-4.0/diplodlg.c @@ -773,6 +773,7 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, int main_row = 0; GActionGroup *group; GMenu *menu; + gchar *escaped; pdialog = fc_malloc(sizeof(*pdialog)); @@ -832,8 +833,9 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, label = gtk_label_new(NULL); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text(nation_plural_for_player(plr0), -1); buf = g_strdup_printf("%s", - nation_plural_for_player(plr0)); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_box_append(GTK_BOX(vbox), label); @@ -854,8 +856,10 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, gtk_widget_set_hexpand(label, TRUE); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text( + ruler_title_for_player(plr0, plr_buf, sizeof(plr_buf)), -1); buf = g_strdup_printf("%s", - ruler_title_for_player(plr0, plr_buf, sizeof(plr_buf))); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_grid_attach(GTK_GRID(hgrid), label, grid_col++, 0, 1, 1); @@ -910,8 +914,9 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, label = gtk_label_new(NULL); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text(nation_plural_for_player(plr1), -1); buf = g_strdup_printf("%s", - nation_plural_for_player(plr1)); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_box_append(GTK_BOX(vbox), label); @@ -933,8 +938,10 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, gtk_widget_set_hexpand(label, TRUE); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text( + title_for_player(plr1, plr_buf, sizeof(plr_buf)), -1); buf = g_strdup_printf("%s", - title_for_player(plr1, plr_buf, sizeof(plr_buf))); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_grid_attach(GTK_GRID(hgrid), label, grid_col++, 0, 1, 1); diff --git a/client/gui-gtk-4.0/plrdlg.c b/client/gui-gtk-4.0/plrdlg.c index c3bd5e3800..97180e7cba 100644 --- a/client/gui-gtk-4.0/plrdlg.c +++ b/client/gui-gtk-4.0/plrdlg.c @@ -788,6 +788,8 @@ static void fill_row(GtkListStore *store, GtkTreeIter *it, GdkPixbuf *pixbuf; int style = PANGO_STYLE_NORMAL, weight = PANGO_WEIGHT_NORMAL; int k; + const char * score_tt = score_tooltip(pplayer, pplayer->score.game); + gchar *escaped_score_tt = g_markup_escape_text(score_tt, -1); for (k = 0; k < num_player_dlg_columns; k++) { pcol = &player_dlg_columns[k]; @@ -816,8 +818,7 @@ static void fill_row(GtkListStore *store, GtkTreeIter *it, } } - gtk_list_store_set(store, it, PLR_DLG_COL_TOOLTIP, - score_tooltip(pplayer, pplayer->score.game), -1); + gtk_list_store_set(store, it, PLR_DLG_COL_TOOLTIP, escaped_score_tt, -1); /* Now add some eye candy ... */ if (client_has_player()) { diff --git a/client/gui-gtk-4.0/repodlgs.c b/client/gui-gtk-4.0/repodlgs.c index 3832af2498..872312087b 100644 --- a/client/gui-gtk-4.0/repodlgs.c +++ b/client/gui-gtk-4.0/repodlgs.c @@ -1951,13 +1951,17 @@ void endgame_report_dialog_player(const struct packet_endgame_player *packet) const struct player *pplayer = player_by_number(packet->player_id); GtkTreeIter iter; int i; + const char * player_nm = player_name(pplayer); + gchar *escaped_player_nm = g_markup_escape_text(player_nm, -1); + const char * score_tt = score_tooltip(pplayer, pplayer->score.game); + gchar *escaped_score_tt = g_markup_escape_text(score_tt, -1); gtk_list_store_append(preport->store, &iter); gtk_list_store_set(preport->store, &iter, - FRD_COL_PLAYER, player_name(pplayer), + FRD_COL_PLAYER, escaped_player_nm, FRD_COL_NATION, get_flag(nation_of_player(pplayer)), FRD_COL_SCORE, packet->score, - FRD_COL_TOOLTIP, score_tooltip(pplayer, packet->score), + FRD_COL_TOOLTIP, escaped_score_tt, -1); for (i = 0; i < packet->category_num; i++) { gtk_list_store_set(preport->store, &iter, diff --git a/client/gui-gtk-5.0/citydlg.c b/client/gui-gtk-5.0/citydlg.c index e12faddb13..e9bc595cba 100644 --- a/client/gui-gtk-5.0/citydlg.c +++ b/client/gui-gtk-5.0/citydlg.c @@ -2053,32 +2053,34 @@ static void city_dialog_update_title(struct city_dialog *pdialog) { gchar *buf; const gchar *now; + const char * city_name = city_name_getx(pdialog->pcity); + gchar *escaped_city_name = g_markup_escape_text(city_name, -1);; if (city_unhappy(pdialog->pcity)) { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens - DISORDER"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } else if (city_celebrating(pdialog->pcity)) { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens - celebrating"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } else if (city_happy(pdialog->pcity)) { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens - happy"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } else { /* TRANS: city dialog title */ buf = g_strdup_printf(_("%s - %s citizens"), - city_name_getx(pdialog->pcity), + escaped_city_name, population_to_text(city_population(pdialog->pcity))); } now = gtk_label_get_text(GTK_LABEL(pdialog->name_label)); if (strcmp(now, buf) != 0) { - gtk_window_set_title(GTK_WINDOW(pdialog->shell), city_name_getx(pdialog->pcity)); + gtk_window_set_title(GTK_WINDOW(pdialog->shell), city_name); gtk_label_set_markup(GTK_LABEL(pdialog->name_label), buf); } diff --git a/client/gui-gtk-5.0/diplodlg.c b/client/gui-gtk-5.0/diplodlg.c index 777f94e7dc..db5fac6530 100644 --- a/client/gui-gtk-5.0/diplodlg.c +++ b/client/gui-gtk-5.0/diplodlg.c @@ -822,6 +822,7 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, int main_row = 0; GActionGroup *group; GMenu *menu; + gchar *escaped; pdialog = fc_malloc(sizeof(*pdialog)); @@ -881,8 +882,9 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, label = gtk_label_new(NULL); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text(nation_plural_for_player(plr0), -1); buf = g_strdup_printf("%s", - nation_plural_for_player(plr0)); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_box_append(GTK_BOX(vbox), label); @@ -903,8 +905,10 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, gtk_widget_set_hexpand(label, TRUE); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text( + ruler_title_for_player(plr0, plr_buf, sizeof(plr_buf)), -1); buf = g_strdup_printf("%s", - ruler_title_for_player(plr0, plr_buf, sizeof(plr_buf))); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_grid_attach(GTK_GRID(hgrid), label, grid_col++, 0, 1, 1); @@ -959,8 +963,9 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, label = gtk_label_new(NULL); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text(nation_plural_for_player(plr1), -1); buf = g_strdup_printf("%s", - nation_plural_for_player(plr1)); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_box_append(GTK_BOX(vbox), label); @@ -982,8 +987,10 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct treaty *ptreaty, gtk_widget_set_hexpand(label, TRUE); gtk_widget_set_halign(label, GTK_ALIGN_CENTER); gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + escaped = g_markup_escape_text( + title_for_player(plr1, plr_buf, sizeof(plr_buf)), -1); buf = g_strdup_printf("%s", - title_for_player(plr1, plr_buf, sizeof(plr_buf))); + escaped); gtk_label_set_markup(GTK_LABEL(label), buf); g_free(buf); gtk_grid_attach(GTK_GRID(hgrid), label, grid_col++, 0, 1, 1); diff --git a/client/gui-gtk-5.0/plrdlg.c b/client/gui-gtk-5.0/plrdlg.c index f77c5ad441..13319fbc14 100644 --- a/client/gui-gtk-5.0/plrdlg.c +++ b/client/gui-gtk-5.0/plrdlg.c @@ -788,6 +788,8 @@ static void fill_row(GtkListStore *store, GtkTreeIter *it, GdkPixbuf *pixbuf; int style = PANGO_STYLE_NORMAL, weight = PANGO_WEIGHT_NORMAL; int k; + const char * score_tt = score_tooltip(pplayer, pplayer->score.game); + gchar *escaped_score_tt = g_markup_escape_text(score_tt, -1); for (k = 0; k < num_player_dlg_columns; k++) { pcol = &player_dlg_columns[k]; @@ -816,8 +818,7 @@ static void fill_row(GtkListStore *store, GtkTreeIter *it, } } - gtk_list_store_set(store, it, PLR_DLG_COL_TOOLTIP, - score_tooltip(pplayer, pplayer->score.game), -1); + gtk_list_store_set(store, it, PLR_DLG_COL_TOOLTIP, escaped_score_tt, -1); /* Now add some eye candy ... */ if (client_has_player()) { diff --git a/client/gui-gtk-5.0/repodlgs.c b/client/gui-gtk-5.0/repodlgs.c index f8671cafae..cc63f26695 100644 --- a/client/gui-gtk-5.0/repodlgs.c +++ b/client/gui-gtk-5.0/repodlgs.c @@ -1951,13 +1951,17 @@ void endgame_report_dialog_player(const struct packet_endgame_player *packet) const struct player *pplayer = player_by_number(packet->player_id); GtkTreeIter iter; int i; + const char * player_nm = player_name(pplayer); + gchar *escaped_player_nm = g_markup_escape_text(player_nm, -1); + const char * score_tt = score_tooltip(pplayer, pplayer->score.game); + gchar *escaped_score_tt = g_markup_escape_text(score_tt, -1); gtk_list_store_append(preport->store, &iter); gtk_list_store_set(preport->store, &iter, - FRD_COL_PLAYER, player_name(pplayer), + FRD_COL_PLAYER, escaped_player_nm, FRD_COL_NATION, get_flag(nation_of_player(pplayer)), FRD_COL_SCORE, packet->score, - FRD_COL_TOOLTIP, score_tooltip(pplayer, packet->score), + FRD_COL_TOOLTIP, escaped_score_tt, -1); for (i = 0; i < packet->category_num; i++) { gtk_list_store_set(preport->store, &iter, -- 2.31.0