Index: Decorate.py =================================================================== --- Decorate.py (revision 8147) +++ Decorate.py (working copy) @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2006 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -115,9 +115,15 @@ payload = payload.encode(mcset) newcset = mcset # if this fails, fallback to outer try and wrap=true + format = msg.get_param('format') + delsp = msg.get_param('delsp') del msg['content-transfer-encoding'] del msg['content-type'] msg.set_payload(payload, newcset) + if format: + msg.set_param('Format', format) + if delsp: + msg.set_param('DelSp', delsp) wrap = False except (LookupError, UnicodeError): pass Index: Scrubber.py =================================================================== --- Scrubber.py (revision 8147) +++ Scrubber.py (working copy) @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2006 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2007 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -380,7 +380,13 @@ text.append(t) # Now join the text and set the payload sep = _('-------------- next part --------------\n') + format = msg.get_param('format') + delsp = msg.get_param('delsp') replace_payload_by_text(msg, sep.join(text), charset) + if format: + msg.set_param('Format', format) + if delsp: + msg.set_param('DelSp', delsp) return msg