commit 967c67304bd620e5d039f45fe0911bcb3483f853
parent 44336aa8ce39ea0769ad03ec3fac483ddc0e855b
Author: Tero Tilus <tero@tilus.net>
Date: Thu, 26 Nov 2009 15:00:17 +0200
RFC 2047 decode attachment file names
Signed-off-by: Tero Tilus
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
@@ -494,6 +494,8 @@ private
## if there's a filename, we'll treat it as an attachment.
if filename
+ ## filename could be 2047 encoded
+ filename = Rfc2047.decode_to $encoding, filename
# add this to the attachments list if its not a generated html
# attachment (should we allow images with generated names?).
# Lowercase the filename because searches are easier that way