aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-html-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-html-utils.c')
-rw-r--r--e-util/e-html-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c
index 1561492454..e79d5e2192 100644
--- a/e-util/e-html-utils.c
+++ b/e-util/e-html-utils.c
@@ -145,7 +145,7 @@ is_citation (const unsigned char *c, gboolean saw_citation)
}
/* Check for "Rupert> " and the like... */
- for (i = 0; c && *c && *c != '\n' && i < 10; i ++, c = g_utf8_next_char (c)) {
+ for (i = 0; c && *c && g_unichar_validate (g_utf8_get_char (c)) && *c != '\n' && i < 10; i ++, c = g_utf8_next_char (c)) {
u = g_utf8_get_char (c);
if (u == '>')
return TRUE;
@@ -304,7 +304,7 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color)
}
}
- if (u == (gunichar)-1) {
+ if (!g_unichar_validate (u)) {
/* Sigh. Someone sent undeclared 8-bit data.
* Assume it's iso-8859-1.
*/