From 048c86ffcfee63993506c1a84e3b3a6a6d87fae7 Mon Sep 17 00:00:00 2001 From: Jehan Date: Wed, 13 Aug 2025 19:37:22 +0200 Subject: [PATCH] app: properly escape characters which need to be. This fixes handling of text with for instance an ampersand (as in the next AppStream release note listing). --- app/dialogs/welcome-dialog.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/dialogs/welcome-dialog.c b/app/dialogs/welcome-dialog.c index 6e999977a3..e8da531034 100644 --- a/app/dialogs/welcome-dialog.c +++ b/app/dialogs/welcome-dialog.c @@ -1085,19 +1085,20 @@ welcome_dialog_create_release_page (Gimp *gimp, { GtkWidget *row; gchar *markup; + gchar *text; + + text = g_markup_escape_text (_((gchar *) gimp_welcome_dialog_items[i]), -1); /* Add a bold dot for pretty listing. */ if (i < gimp_welcome_dialog_n_items && gimp_welcome_dialog_demos[i] != NULL) { - markup = g_strdup_printf ("\xe2\x96\xb6 %s", - _((gchar *) gimp_welcome_dialog_items[i])); + markup = g_strdup_printf ("\xe2\x96\xb6 %s", text); n_demos++; } else { - markup = g_strdup_printf ("\xe2\x80\xa2 %s", - _((gchar *) gimp_welcome_dialog_items[i])); + markup = g_strdup_printf ("\xe2\x80\xa2 %s", text); } row = gtk_list_box_row_new (); @@ -1114,6 +1115,7 @@ welcome_dialog_create_release_page (Gimp *gimp, gtk_widget_show_all (row); g_free (markup); + g_free (text); } gtk_container_add (GTK_CONTAINER (scrolled_window), listbox); gtk_list_box_set_selection_mode (GTK_LIST_BOX (listbox),