aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-alert.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-02-16 22:36:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-02-16 22:37:11 +0800
commitc458a0045be9e795e0ee7ee470ee02525704b180 (patch)
treec4c1276fa8678b206c8c6979456d9e81a29def4c /e-util/e-alert.c
parent6485d65bf1b963a806c61ee0708abab84dd43a30 (diff)
downloadgsoc2013-evolution-c458a0045be9e795e0ee7ee470ee02525704b180.tar.gz
gsoc2013-evolution-c458a0045be9e795e0ee7ee470ee02525704b180.tar.zst
gsoc2013-evolution-c458a0045be9e795e0ee7ee470ee02525704b180.zip
Bug 610085 - e_alert_get_primary_text() does not escape arguments
Diffstat (limited to 'e-util/e-alert.c')
-rw-r--r--e-util/e-alert.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/e-util/e-alert.c b/e-util/e-alert.c
index ac9d9652bf..7a08c30e83 100644
--- a/e-util/e-alert.c
+++ b/e-util/e-alert.c
@@ -536,22 +536,11 @@ e_alert_new_array(const gchar *tag, GPtrArray *args)
static void
e_alert_append_text_escaped (GString *out, const gchar *text)
{
- gchar c;
-
- while ((c=*text++)) {
- if (c == '<')
- g_string_append(out, "&lt;");
- else if (c == '>')
- g_string_append(out, "&gt;");
- else if (c == '"')
- g_string_append(out, "&quot;");
- else if (c == '\'')
- g_string_append(out, "&apos;");
- else if (c == '&')
- g_string_append(out, "&amp;");
- else
- g_string_append_c(out, c);
- }
+ gchar *markup;
+
+ markup = g_markup_escape_text (text, -1);
+ g_string_append (out, markup);
+ g_free (markup);
}
static void
@@ -625,7 +614,7 @@ e_alert_get_primary_text (EAlert *alert)
if (alert->priv->definition->primary) {
e_alert_format_string (formatted,
alert->priv->definition->primary,
- alert->priv->args, FALSE);
+ alert->priv->args, TRUE);
} else {
gchar *title = e_alert_get_title (alert);
g_string_append (formatted, title);