From 7c6f220e95feb3bc79f48aca16b5ca691a561d97 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 21 Jul 2019 21:40:37 +0530 Subject: email: Decode MIME encoded words in Subject header. Prior to this, MIME encoded words in the Subject header were not decoded. * email/email.scm (parse-email-headers): Decode MIME encoded words in Subject header. * tests/email.scm ("decode MIME encoded words in Subject header"): New test. Reported-by: Ricardo Wurmus --- tests/email.scm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/email.scm') diff --git a/tests/email.scm b/tests/email.scm index fb2c45b..ab2a408 100644 --- a/tests/email.scm +++ b/tests/email.scm @@ -144,4 +144,13 @@ foo "=?iso-8859-1?Q?=A1Hola,_se=F1or!?= =?UTF-8?Q?B=C3=A3r?=") "¡Hola, señor! Bãr") +(test-equal "decode MIME encoded words in Subject header" + (parse-email-headers "Subject: Foo =?UTF-8?Q?B=C3=A3r?= +") + `((content-type (type . text) + (subtype . plain) + (charset . "utf-8")) + (content-transfer-encoding . 7bit) + (subject . "Foo Bãr"))) + (test-end "email") -- cgit v1.2.3