From 7c1bf4c17156bda9654645775e0e03c5535ee851 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 2 Dec 2006 12:49:49 +0000 Subject: [PATCH] escape '<' in strings with Pango markup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/assertdlg_gtk.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gtk/assertdlg_gtk.c b/src/gtk/assertdlg_gtk.c index 767f5a0158..88dec90bb5 100644 --- a/src/gtk/assertdlg_gtk.c +++ b/src/gtk/assertdlg_gtk.c @@ -438,13 +438,17 @@ gchar *gtk_assert_dialog_get_backtrace (GtkAssertDialog *dlg) void gtk_assert_dialog_set_message(GtkAssertDialog *dlg, const gchar *msg) { - /* prepend and append the tag */ - gchar *decorated_msg = g_strdup_printf("%s", msg); + /* prepend and append the tag + NOTE: g_markup_printf_escaped() is not used because it's available + only for glib >= 2.4 */ + gchar *escaped_msg = g_markup_escape_text (msg, -1); + gchar *decorated_msg = g_strdup_printf ("%s", escaped_msg); g_return_if_fail (GTK_IS_ASSERT_DIALOG (dlg)); gtk_label_set_markup (GTK_LABEL(dlg->message), decorated_msg); g_free (decorated_msg); + g_free (escaped_msg); } void gtk_assert_dialog_set_backtrace_callback(GtkAssertDialog *assertdlg, -- 2.45.2