buffer = gtk_text_view_get_buffer(text);
charcount = gtk_text_buffer_get_char_count(buffer);
gtk_text_buffer_get_end_iter(buffer, &iter);
-
+
if (textview->stop_loading) {
return;
}
return;
}
+ previousquotelevel = -1;
+
if ((mimeinfo->type == MIMETYPE_MESSAGE) && !g_ascii_strcasecmp(mimeinfo->subtype, "rfc822")) {
FILE *fp;
}
if (real_quotelevel > -1 && do_quote_folding) {
+ if (!g_utf8_validate(buf, -1, NULL)) {
+ gchar *utf8buf = NULL;
+ utf8buf = g_malloc(BUFFSIZE);
+ conv_localetodisp(utf8buf, BUFFSIZE, buf);
+ strncpy2(buf, utf8buf, BUFFSIZE-1);
+ g_free(utf8buf);
+ }
+do_quote:
if ( previousquotelevel != real_quotelevel ) {
ClickableText *uri;
uri = g_new0(ClickableText, 1);
} else {
GSList *last = textview->uri_list;
ClickableText *lasturi = (ClickableText *)last->data;
- gint e_len = lasturi->data ? strlen(lasturi->data):0;
- gint n_len = strlen(buf);
+ gint e_len = 0, n_len = 0;
+
+ if (lasturi->is_quote == FALSE) {
+ previousquotelevel = -1;
+ goto do_quote;
+ }
+ e_len = lasturi->data ? strlen(lasturi->data):0;
+ n_len = strlen(buf);
lasturi->data = g_realloc((gchar *)lasturi->data, e_len + n_len + 1);
strcpy((gchar *)lasturi->data + e_len, buf);
*((gchar *)lasturi->data + e_len + n_len) = '\0';