aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-quote.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-05-13 23:37:54 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-05-13 23:37:54 +0800
commitc22062eb58d8b15321d9c0dcc3c3bf02574ecc19 (patch)
tree285e1af34681dfa94d36853c8a2e8f8202f6927c /mail/em-format-quote.c
parent6ab7885bbe8a546cc9d5ebb585f0de420b6510eb (diff)
downloadgsoc2013-evolution-c22062eb58d8b15321d9c0dcc3c3bf02574ecc19.tar
gsoc2013-evolution-c22062eb58d8b15321d9c0dcc3c3bf02574ecc19.tar.gz
gsoc2013-evolution-c22062eb58d8b15321d9c0dcc3c3bf02574ecc19.tar.bz2
gsoc2013-evolution-c22062eb58d8b15321d9c0dcc3c3bf02574ecc19.tar.lz
gsoc2013-evolution-c22062eb58d8b15321d9c0dcc3c3bf02574ecc19.tar.xz
gsoc2013-evolution-c22062eb58d8b15321d9c0dcc3c3bf02574ecc19.tar.zst
gsoc2013-evolution-c22062eb58d8b15321d9c0dcc3c3bf02574ecc19.zip
Add a stripsig filter. Fixes bug #52767.
2004-05-13 Jeffrey Stedfast <fejj@novell.com> * em-format-quote.c (emfq_text_plain): Add a stripsig filter. Fixes bug #52767. * em-stripsig-filter.[c,h]: New filter class to strip signatures. Useful when generating forwards/replies. svn path=/trunk/; revision=25902
Diffstat (limited to 'mail/em-format-quote.c')
-rw-r--r--mail/em-format-quote.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c
index ede8f8e94a..f0f45787ae 100644
--- a/mail/em-format-quote.c
+++ b/mail/em-format-quote.c
@@ -36,6 +36,7 @@
#include <gal/util/e-iconv.h>
+#include "em-stripsig-filter.h"
#include "em-format-quote.h"
struct _EMFormatQuotePrivate {
@@ -422,6 +423,7 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E
{
CamelStreamFilter *filtered_stream;
CamelMimeFilter *html_filter;
+ CamelMimeFilter *sig_strip;
CamelContentType *type;
const char *format;
guint32 rgb = 0x737373, flags;
@@ -435,10 +437,13 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E
&& !g_ascii_strcasecmp(format, "flowed"))
flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED;
+ sig_strip = em_stripsig_filter_new();
html_filter = camel_mime_filter_tohtml_new(flags, rgb);
filtered_stream = camel_stream_filter_new_with_stream(stream);
+ camel_stream_filter_add(filtered_stream, sig_strip);
camel_stream_filter_add(filtered_stream, html_filter);
camel_object_unref(html_filter);
+ camel_object_unref(sig_strip);
em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, camel_medium_get_content_object((CamelMedium *)part));
camel_stream_flush((CamelStream *)filtered_stream);
@@ -457,9 +462,9 @@ emfq_text_enriched(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part
if (!strcmp(info->mime_type, "text/richtext")) {
flags = CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT;
- camel_stream_write_string( stream, "\n<!-- text/richtext -->\n");
+ camel_stream_write_string(stream, "\n<!-- text/richtext -->\n");
} else {
- camel_stream_write_string( stream, "\n<!-- text/enriched -->\n");
+ camel_stream_write_string(stream, "\n<!-- text/enriched -->\n");
}
enriched = camel_mime_filter_enriched_new(flags);