Fix path in EditPage form action
authorBernie Innocenti <bernie@codewiz.org>
Tue, 12 Oct 2010 11:02:57 +0000 (07:02 -0400)
committerBernie Innocenti <bernie@codewiz.org>
Tue, 12 Oct 2010 11:02:57 +0000 (07:02 -0400)
sys/EditPage
sys/macros/CgiVar.py

index b33b583f2ef8d4d730cc7cc8f16ead38e42d0bb3..a6deb5eecebc10eb94cc26ede35da7024326e328 100644 (file)
@@ -1,6 +1,6 @@
 **Editing <<HttpGet|q>> for <<CgiVar|REMOTE_USER>> from <<CgiVar|REMOTE_HOST>>**
 <div class="editor">
-<form method="post" enctype="multipart/form-data" action="<<HttpGet|q>>" >
+<form method="post" enctype="multipart/form-data" action="<<CgiVar|SCRIPT_NAME>>/<<HttpGet|q>>" >
 <input type="hidden" name="a" value="edit">
 <input type="hidden" name="q" value="<<HttpGet|q>>">
 <textarea wrap="off" autofocus="true" spellcheck="true" id="editor" name="savetext" rows="17" cols="100" accesskey="e"><<EDIT_BODY>></textarea>
index b29f5d489e6c7a6f15c315c9294351faec6fb993..2f0797a331313e1ee7d7ac0ad02abbfb35412c4f 100644 (file)
@@ -6,6 +6,7 @@ def _macro_CgiVar(*args, **kvargs):
     if args[1].startswith('HTTP_'):
         return os.environ.get(args[1], '')
     return {
+        'SCRIPT_NAME': script_name(),
         'REMOTE_USER': remote_user(),
         'REMOTE_HOST': get_hostname(remote_host()),
         'REMOTE_ADDR': remote_host(),