changeset 1150:f1b0ce6fb5c7

mailimport: use quoting for attachment:
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 09 Aug 2006 22:54:44 +0200
parents 9c7cc9ba84c5
children 056cd240cff9
files MoinMoin/mail/mailimport.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/mail/mailimport.py	Wed Aug 09 21:28:10 2006 +0200
+++ b/MoinMoin/mail/mailimport.py	Wed Aug 09 22:54:44 2006 +0200
@@ -206,8 +206,7 @@
                 break
 
     # build an attachment link table for the page with the e-mail
-    escape_link = lambda x: x.replace(" ", "%20")
-    attachment_links = [""] + [u"[attachment:%s attachment:%s]" % tuple([escape_link(u"%s/%s" % (pagename, x))] * 2) for x in attachments]
+    attachment_links = [""] + [u'''[attachment:"%s" attachment:"%s"]''' % tuple([u"%s/%s" % (pagename, x)] * 2) for x in attachments]
 
     # assemble old page content and new mail body together
     old_content = Page(request, pagename).get_raw_body()