aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-11-25 10:41:29 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-11-25 10:41:29 +0000
commitd36950b74ceaa841622df1a885f6d5e20395ff8e (patch)
treed7dcb0876b9e0f9a42dcac8562a9687b81540f86 /libsylph
parent966bdae3e0ff9129ba5832f3e59b302c22371211 (diff)
uncanonicalize unencoded text when saving.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@780 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/procmime.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libsylph/procmime.c b/libsylph/procmime.c
index daca09ae..6207807e 100644
--- a/libsylph/procmime.c
+++ b/libsylph/procmime.c
@@ -637,9 +637,23 @@ FILE *procmime_decode_content(FILE *outfp, FILE *infp, MimeInfo *mimeinfo)
flag = TRUE;
}
} else {
+#ifndef G_OS_WIN32
+ gboolean uncanonicalize = FALSE;
+ ContentType content_type;
+
+ content_type = procmime_scan_mime_type(mimeinfo->content_type);
+ if (content_type == MIME_TEXT ||
+ content_type == MIME_TEXT_HTML)
+ uncanonicalize = TRUE;
+#endif
+
while (fgets(buf, sizeof(buf), infp) != NULL &&
(!boundary ||
!IS_BOUNDARY(buf, boundary, boundary_len))) {
+#ifndef G_OS_WIN32
+ if (uncanonicalize)
+ strcrchomp(buf);
+#endif
fputs(buf, outfp);
}
}