aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-03 13:59:57 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-03 13:59:57 +0800
commit57d8da86bea3ffe10aca2ebf71d4fdafcbc92dc7 (patch)
tree3c0fc843be42aa2eeb349a46db37d7cd039fff24
parentf954da0a50049423246a3ba666f4172db4839eea (diff)
downloadgsoc2013-evolution-57d8da86bea3ffe10aca2ebf71d4fdafcbc92dc7.tar
gsoc2013-evolution-57d8da86bea3ffe10aca2ebf71d4fdafcbc92dc7.tar.gz
gsoc2013-evolution-57d8da86bea3ffe10aca2ebf71d4fdafcbc92dc7.tar.bz2
gsoc2013-evolution-57d8da86bea3ffe10aca2ebf71d4fdafcbc92dc7.tar.lz
gsoc2013-evolution-57d8da86bea3ffe10aca2ebf71d4fdafcbc92dc7.tar.xz
gsoc2013-evolution-57d8da86bea3ffe10aca2ebf71d4fdafcbc92dc7.tar.zst
gsoc2013-evolution-57d8da86bea3ffe10aca2ebf71d4fdafcbc92dc7.zip
blah, need to do entity decoding. #57918.
2004-05-03 Not Zed <NotZed@Ximian.com> * e-error.c (ee_build_label): blah, need to do entity decoding. #57918. svn path=/trunk/; revision=25741
-rw-r--r--widgets/misc/ChangeLog5
-rw-r--r--widgets/misc/e-error.c24
2 files changed, 28 insertions, 1 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index e298bcde55..130b71ed40 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-03 Not Zed <NotZed@Ximian.com>
+
+ * e-error.c (ee_build_label): blah, need to do entity decoding.
+ #57918.
+
2004-04-29 JP Rosevear <jpr@ximian.com>
* e-activity-handler.c (impl_dispose): pass the correct data when
diff --git a/widgets/misc/e-error.c b/widgets/misc/e-error.c
index c537de8078..a456802be4 100644
--- a/widgets/misc/e-error.c
+++ b/widgets/misc/e-error.c
@@ -353,6 +353,28 @@ ee_load_tables(void)
closedir(dir);
}
+/* unfortunately, gmarkup_escape doesn't expose its gstring based api :( */
+static void
+ee_append_text(GString *out, const char *text)
+{
+ char 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);
+ }
+}
+
static void
ee_build_label(GString *out, const char *fmt, GPtrArray *args)
{
@@ -365,7 +387,7 @@ ee_build_label(GString *out, const char *fmt, GPtrArray *args)
g_string_append_len(out, fmt, newstart-fmt);
id = atoi(newstart+1);
if (id < args->len)
- g_string_append(out, args->pdata[id]);
+ ee_append_text(out, args->pdata[id]);
else
g_warning("Error references argument %d not supplied by caller", id);
fmt = end+1;