diff --git a/gnucash/import-export/qif-imp/assistant-qif-import.c b/gnucash/import-export/qif-imp/assistant-qif-import.c
index c91caa88454..cfe5949a07a 100644
--- a/gnucash/import-export/qif-imp/assistant-qif-import.c
+++ b/gnucash/import-export/qif-imp/assistant-qif-import.c
@@ -3563,14 +3563,14 @@ gnc_ui_qif_import_summary_page_prepare (GtkAssistant *assistant,
gpointer user_data)
{
QIFImportWindow * wind = user_data;
- gchar *text;
- if (wind->load_stop)
- text = g_strdup_printf (_("There was a problem with the import."));
- else
- text = g_strdup_printf (_("QIF Import Completed."));
+ const gchar *msg = wind->load_stop ?
+ _("There was a problem with the import.") :
+ _("QIF Import Completed.");
+
+ gchar *text = g_markup_printf_escaped ("%s", msg);
- gtk_label_set_markup (GTK_LABEL(wind->summary_text), g_strdup_printf ("%s", text));
+ gtk_label_set_markup (GTK_LABEL(wind->summary_text), text);
g_free (text);