diff options
author | Not Zed <NotZed@Ximian.com> | 2004-05-03 13:59:57 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-05-03 13:59:57 +0800 |
commit | 57d8da86bea3ffe10aca2ebf71d4fdafcbc92dc7 (patch) | |
tree | 3c0fc843be42aa2eeb349a46db37d7cd039fff24 /widgets/misc/e-error.c | |
parent | f954da0a50049423246a3ba666f4172db4839eea (diff) | |
download | gsoc2013-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
Diffstat (limited to 'widgets/misc/e-error.c')
-rw-r--r-- | widgets/misc/e-error.c | 24 |
1 files changed, 23 insertions, 1 deletions
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; |