diff MoinMoin/action/AttachFile.py @ 4235:a6c315ff8d66

Make more use of werkzeugs Href object for URL-generation in MoinMoin
author Florian Krupicka <florian.krupicka@googlemail.com>
date Sun, 20 Jul 2008 18:08:13 +0200
parents a29fd3a9e91f
children 07862b0663fd
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Sun Jul 20 16:43:12 2008 +0200
+++ b/MoinMoin/action/AttachFile.py	Sun Jul 20 18:08:13 2008 +0200
@@ -723,11 +723,10 @@
 
     # move file
     d = {'action': action_name,
-         'baseurl': request.script_root,
+         'url': request.href(pagename),
          'do': 'attachment_move',
          'ticket': wikiutil.createTicket(request),
          'pagename': pagename,
-         'pagename_quoted': wikiutil.quoteWikinameURL(pagename),
          'attachment_name': filename,
          'move': _('Move'),
          'cancel': _('Cancel'),
@@ -735,7 +734,7 @@
          'attachment_label': _("New attachment name"),
         }
     formhtml = '''
-<form action="%(baseurl)s/%(pagename_quoted)s" method="POST">
+<form action="%(url)s" method="POST">
 <input type="hidden" name="action" value="%(action)s">
 <input type="hidden" name="do" value="%(do)s">
 <input type="hidden" name="ticket" value="%(ticket)s">