diff options
-rw-r--r-- | widgets/misc/ChangeLog | 5 | ||||
-rw-r--r-- | widgets/misc/e-error.c | 24 |
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, "<"); + 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); + } +} + 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; |