X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-text-utils.c;h=8a83e60856fdc61e566e79beee332eb0595103ae;hp=2ff2417f246a4d54c1d1dc4b4e1224070012f59a;hb=8df610f0be41b018033b2143018f54ff732736eb;hpb=71163813c23c885ddadee8ed169d7445bd2f30d1 diff --git a/src/modest-text-utils.c b/src/modest-text-utils.c index 2ff2417..8a83e60 100644 --- a/src/modest-text-utils.c +++ b/src/modest-text-utils.c @@ -180,18 +180,18 @@ modest_text_utils_cite (const gchar *text, { gchar *retval; gchar *tmp_sig; - + g_return_val_if_fail (text, NULL); g_return_val_if_fail (content_type, NULL); - + if (!signature) retval = g_strdup (""); - else if (!strcmp(content_type, "text/html")) { + else if (strcmp(content_type, "text/html") == 0) { tmp_sig = g_strconcat ("\n", signature, NULL); retval = modest_text_utils_convert_to_html_body(tmp_sig); g_free (tmp_sig); } else { - retval = g_strconcat ("\n", signature, NULL); + retval = g_strconcat (text, "\n", signature, NULL); } return retval; @@ -199,9 +199,9 @@ modest_text_utils_cite (const gchar *text, static gchar * forward_cite (const gchar *from, - const gchar *sent, - const gchar *to, - const gchar *subject) + const gchar *sent, + const gchar *to, + const gchar *subject) { return g_strdup_printf ("%s\n%s %s\n%s %s\n%s %s\n%s %s\n", FORWARD_STRING, @@ -354,7 +354,9 @@ modest_text_utils_convert_buffer_to_html (GString *html, const gchar *data) case '>' : g_string_append (html, ">"); break; case '&' : g_string_append (html, "&"); break; case '"' : g_string_append (html, """); break; - case '\'' : g_string_append (html, "'"); break; + + /* don't convert ' --> wpeditor will try to re-convert it... */ + //case '\'' : g_string_append (html, "'"); break; case '\n' : g_string_append (html, "
\n"); break_dist= 0; break; case '\t' : g_string_append (html, "    "); break_dist=0; break; /* note the space at the end*/ case ' ': @@ -833,6 +835,7 @@ modest_text_utils_quote_html (const gchar *text, g_free (attachments_string); g_free (q_attachments_string); g_free (signature_result); + return result; } @@ -894,7 +897,6 @@ get_url_matches (GString *txt) match->offset = offset + rm.rm_so; match->len = rm.rm_eo - rm.rm_so; match->prefix = patterns[i].prefix; - g_warning ("<%d, %d, %s>", match->offset, match->len, match->prefix); match_list = g_slist_prepend (match_list, match); }