* [PATCH 2/2] t/view: ensure HTML shows QP text
@ 2014-08-05 0:45 7% ` Eric Wong
0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2014-08-05 0:45 UTC (permalink / raw)
To: meta; +Cc: Eric Wong
We need to ensure the HTML output is not mangled, either.
---
t/view.t | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/t/view.t b/t/view.t
index 10a182b..bc6fbed 100644
--- a/t/view.t
+++ b/t/view.t
@@ -110,4 +110,29 @@ EOF
"parts split with filename");
}
+# multipart collapsed to single quoted-printable text/plain
+{
+ my $parts = [
+ Email::MIME->create(
+ attributes => {
+ content_type => 'text/plain',
+ encoding => 'quoted-printable',
+ },
+ body => 'hi = bye',
+ )
+ ];
+ my $mime = Email::MIME->create(
+ header_str => [
+ From => 'qp@example.com',
+ Subject => 'QP',
+ 'Message-ID' => '<qp@example.com>',
+ ],
+ parts => $parts,
+ );
+
+ my $html = PublicInbox::View->msg_html($mime);
+ like($mime->body_raw, qr/hi =3D bye=/, "our test used QP correctly");
+ like($html, qr/\bhi = bye\b/, "HTML output decoded QP");
+}
+
done_testing();
--
2.0.1.427.gc47372d
^ permalink raw reply related [relevance 7%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-08-05 0:45 [PATCH 1/2] filter: preserve QP when collapsing multipart Eric Wong
2014-08-05 0:45 7% ` [PATCH 2/2] t/view: ensure HTML shows QP text Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).