diff options
Diffstat (limited to 'alot')
-rw-r--r-- | alot/crypto.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/alot/crypto.py b/alot/crypto.py index 97d13292..04d88125 100644 --- a/alot/crypto.py +++ b/alot/crypto.py @@ -29,10 +29,12 @@ def email_as_string(mail): # Workaround for http://bugs.python.org/issue14983: # Insert a newline before the outer mail boundary so that other mail - # clients (like KMail, Claws-Mail, mutt, …) can verify the signature when - # sending an email which contains attachments. - as_string = re.sub(r'--\n--' + boundary, - '--\n\n--' + boundary, as_string, flags=re.MULTILINE) + # clients (like KMail, Claws-Mail, mutt, …) can verify the signature + # when sending an email which contains attachments. + as_string = re.sub(r'--(\r\n)--' + boundary, + '--\g<1>\g<1>--' + boundary, + as_string, flags=re.MULTILINE) + return as_string |