summaryrefslogtreecommitdiff
path: root/email
diff options
context:
space:
mode:
authorArun Isaac2019-07-21 21:40:37 +0530
committerArun Isaac2019-07-21 21:40:37 +0530
commit7c6f220e95feb3bc79f48aca16b5ca691a561d97 (patch)
tree9bd27e0cc090923f908e1182a9f666c5cbc885cf /email
parentaec25de053a0eabe58f1c5b0d6ff66d296e2c5ca (diff)
downloadguile-email-7c6f220e95feb3bc79f48aca16b5ca691a561d97.tar.gz
guile-email-7c6f220e95feb3bc79f48aca16b5ca691a561d97.tar.lz
guile-email-7c6f220e95feb3bc79f48aca16b5ca691a561d97.zip
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 <rekado@elephly.net>
Diffstat (limited to 'email')
-rw-r--r--email/email.scm2
1 files changed, 2 insertions, 0 deletions
diff --git a/email/email.scm b/email/email.scm
index 20bf291..752c941 100644
--- a/email/email.scm
+++ b/email/email.scm
@@ -812,6 +812,8 @@ list of header keys and values."
(content . ,post-process-content-type)
(encoding . ,post-process-content-transfer-encoding)
(disposition . ,post-process-content-disposition)
+ (subject . ,(match-lambda* (`(subject ,subject)
+ `(subject ,(decode-mime-encoded-word subject)))))
(fields . ,(lambda (_ . fields)
(add-default-headers
(filter-map (match-lambda