diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-02-16 22:36:24 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-02-16 22:37:11 +0800 |
commit | c458a0045be9e795e0ee7ee470ee02525704b180 (patch) | |
tree | c4c1276fa8678b206c8c6979456d9e81a29def4c /e-util/e-alert.c | |
parent | 6485d65bf1b963a806c61ee0708abab84dd43a30 (diff) | |
download | gsoc2013-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.c | 23 |
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, "<"); - else if (c == '>') - g_string_append(out, ">"); - else if (c == '"') - g_string_append(out, """); - else if (c == '\'') - g_string_append(out, "'"); - else if (c == '&') - g_string_append(out, "&"); - 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); |