diff options
author | Dan Winship <danw@src.gnome.org> | 2001-05-17 06:30:44 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-05-17 06:30:44 +0800 |
commit | 23bcf6e31ad55d873c00ce3337057106ee471c47 (patch) | |
tree | b8980647d3398bf0c66be6fb35fce2e17824dcb0 /e-util/e-html-utils.c | |
parent | 1849ce6cd24bf6d57dca4e34207e231fd03d8c02 (diff) | |
download | gsoc2013-evolution-23bcf6e31ad55d873c00ce3337057106ee471c47.tar gsoc2013-evolution-23bcf6e31ad55d873c00ce3337057106ee471c47.tar.gz gsoc2013-evolution-23bcf6e31ad55d873c00ce3337057106ee471c47.tar.bz2 gsoc2013-evolution-23bcf6e31ad55d873c00ce3337057106ee471c47.tar.lz gsoc2013-evolution-23bcf6e31ad55d873c00ce3337057106ee471c47.tar.xz gsoc2013-evolution-23bcf6e31ad55d873c00ce3337057106ee471c47.tar.zst gsoc2013-evolution-23bcf6e31ad55d873c00ce3337057106ee471c47.zip |
add E_TEXT_TO_HTML_ESCAPE_8BIT to turn non-US-ASCII characters into "?"s.
* e-html-utils.c (e_text_to_html_full): add
E_TEXT_TO_HTML_ESCAPE_8BIT to turn non-US-ASCII characters into
"?"s.
svn path=/trunk/; revision=9859
Diffstat (limited to 'e-util/e-html-utils.c')
-rw-r--r-- | e-util/e-html-utils.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c index e79d5e2192..6d3eaebcc9 100644 --- a/e-util/e-html-utils.c +++ b/e-util/e-html-utils.c @@ -194,6 +194,8 @@ is_citation (const unsigned char *c, gboolean saw_citation) * * - E_TEXT_TO_HTML_MARK_CITATION: wrap <font color="..."> </font> around * citations (lines beginning with "> ", etc). + * + * - E_TEXT_TO_HTML_ESCAPE_8BIT: flatten everything to US-ASCII **/ char * e_text_to_html_full (const char *input, unsigned int flags, guint32 color) @@ -382,7 +384,10 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color) /* Default case, just copy. */ *out++ = u; } else { - out += g_snprintf(out, 9, "&#%d;", u); + if (flags & E_TEXT_TO_HTML_ESCAPE_8BIT) + *out++ = '?'; + else + out += g_snprintf(out, 9, "&#%d;", u); } col++; break; |