From c9ea7a39daff28e0c75df8b5853fbd4a9bda6bba Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 4 Aug 2014 20:16:51 +0000 Subject: filter: preserve QP when collapsing multipart HTML clients also tend to send quoted-printable crap in their plain-text parts, preserve that so it's displayed correctly for all QP-capable handlers. --- lib/PublicInbox/Filter.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/PublicInbox/Filter.pm b/lib/PublicInbox/Filter.pm index a1587682..e784cded 100644 --- a/lib/PublicInbox/Filter.pm +++ b/lib/PublicInbox/Filter.pm @@ -201,6 +201,10 @@ sub collapse { my ($mime, $part) = @_; $mime->header_set('Content-Type', $part->content_type); $mime->body_set($part->body_raw); + my $cte = $part->header('Content-Transfer-Encoding'); + if (defined($cte) && length($cte)) { + $mime->header_set('Content-Transfer-Encoding', $cte); + } mark_changed($mime); return 1; } -- cgit v1.2.3-24-ge0c7