aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-05-17 06:30:44 +0800
committerDan Winship <danw@src.gnome.org>2001-05-17 06:30:44 +0800
commit23bcf6e31ad55d873c00ce3337057106ee471c47 (patch)
treeb8980647d3398bf0c66be6fb35fce2e17824dcb0 /e-util
parent1849ce6cd24bf6d57dca4e34207e231fd03d8c02 (diff)
downloadgsoc2013-evolution-23bcf6e31ad55d873c00ce3337057106ee471c47.tar.gz
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')
-rw-r--r--e-util/ChangeLog6
-rw-r--r--e-util/e-html-utils.c7
-rw-r--r--e-util/e-html-utils.h1
3 files changed, 13 insertions, 1 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index d0cf6a5369..6c0a558e3d 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,9 @@
+2001-05-16 Dan Winship <danw@ximian.com>
+
+ * e-html-utils.c (e_text_to_html_full): add
+ E_TEXT_TO_HTML_ESCAPE_8BIT to turn non-US-ASCII characters into
+ "?"s.
+
2001-05-14 Jon Trowbridge <trow@ximian.com>
* e-html-utils.c (is_citation): Check for bad utf8.
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;
diff --git a/e-util/e-html-utils.h b/e-util/e-html-utils.h
index e95ca6e24a..d7c0c3b060 100644
--- a/e-util/e-html-utils.h
+++ b/e-util/e-html-utils.h
@@ -31,6 +31,7 @@
#define E_TEXT_TO_HTML_CONVERT_URLS (1 << 3)
#define E_TEXT_TO_HTML_MARK_CITATION (1 << 4)
#define E_TEXT_TO_HTML_CONVERT_ADDRESSES (1 << 5)
+#define E_TEXT_TO_HTML_ESCAPE_8BIT (1 << 6)
char *e_text_to_html_full (const char *input, unsigned int flags, guint32 color);
char *e_text_to_html (const char *input, unsigned int flags);
git/cgit.cgi/freebsd-ports-gnome/commit/devel/commoncpp?h=gstreamer0.10-removal&id=d4f78f1b3fb7169e0c8edac4628ee62bd9319c8c'>BROKEN on 7.0: Does not compilekris2005-10-291-1/+7 * Fix breakage of ccscript on 4.x by lifting requisite commoncpp to gcc 3.4vs2005-10-141-1/+5 * - Update to 1.3.13sem2005-07-122-3/+3 * Add patch to fix build on 6lawrance2005-06-291-0/+12 * Update to 1.3.12lawrance2005-06-244-20/+20 * - Update to 1.2.7pav2005-06-047-47/+37 * Fix build with GCC 3.4.2, and unbreak.danfe2004-12-232-7/+12 * BROKEN on 5.x: Does not compile with gcc 3.4.2kris2004-08-161-1/+7 * Trim whitespace.trevor2004-04-111-1/+1 * upgrade to 1.1.0ijliao2004-02-125-53/+29 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-041-1/+1 * SIZEify.trevor2004-01-291-0/+1 * upgrade to 1.0.13ijliao2003-12-055-110/+35 * USE_REINPLACE need be defined only when REINPLACE_CMD is used.trevor2003-11-171-1/+0 * get rid of libgnugetopt dependency for -CURRENT,sf2003-07-141-2/+4 * De-pkg-comment.knu2003-02-212-1/+1