summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-07-22 11:56:22 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2012-07-22 19:32:53 +0100
commit3f4d68391f9e1fb45f1dea3b6dd994322a178493 (patch)
tree0d557890ce39c60ec9dff4965626a506c7c369a4 /alot
parent5e9b5fe0ace8f5e0bbabd0d21e8cafa1ba23806a (diff)
fix regex
Diffstat (limited to 'alot')
-rw-r--r--alot/crypto.py10
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