summaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2012-11-19 12:15:12 -0500
committerChris Lumens <clumens@redhat.com>2012-11-20 16:22:53 -0500
commit174214924a88bbe4c6e5ac2accb97e2d795fabf7 (patch)
treefd5c8e1816247b32b99096b64eae959cf7a2f803 /widgets
parentf7ebc8442865439cfdeababb4d9a239a571585e8 (diff)
downloadanaconda-174214924a88bbe4c6e5ac2accb97e2d795fabf7.tar.gz
anaconda-174214924a88bbe4c6e5ac2accb97e2d795fabf7.tar.xz
anaconda-174214924a88bbe4c6e5ac2accb97e2d795fabf7.zip
Escape ampersands in spoke status text.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/src/SpokeSelector.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/widgets/src/SpokeSelector.c b/widgets/src/SpokeSelector.c
index b553fa6e4..94966c259 100644
--- a/widgets/src/SpokeSelector.c
+++ b/widgets/src/SpokeSelector.c
@@ -18,6 +18,7 @@
*/
#include <gdk/gdk.h>
+#include <glib.h>
#include <pango/pango.h>
#include "SpokeSelector.h"
@@ -149,16 +150,21 @@ GtkWidget *anaconda_spoke_selector_new() {
}
static void format_status_label(AnacondaSpokeSelector *spoke, const char *markup) {
+ gchar *escaped;
PangoAttrList *attrs;
attrs = pango_attr_list_new();
pango_attr_list_insert(attrs, pango_attr_style_new(PANGO_STYLE_ITALIC));
pango_attr_list_insert(attrs, pango_attr_scale_new(PANGO_SCALE_LARGE));
- gtk_label_set_markup(GTK_LABEL(spoke->priv->status_label), markup);
+ /* Ampersands (and maybe other characters) in status text need to be escaped. */
+ escaped = g_markup_escape_text(markup, -1);
+
+ gtk_label_set_markup(GTK_LABEL(spoke->priv->status_label), escaped);
gtk_label_set_attributes(GTK_LABEL(spoke->priv->status_label), attrs);
pango_attr_list_unref(attrs);
+ g_free(escaped);
}
static void anaconda_spoke_selector_init(AnacondaSpokeSelector *spoke) {