--- wikiaction.py.orig	2005-12-29 08:42:16.800620232 +0100
+++ wikiaction.py	2005-12-29 09:04:45.934520704 +0100
@@ -567,7 +567,10 @@
     if savetext is None:
         pg.sendEditor()
         return
-
+    # Edit was canceled
+    if request.form.has_key('button_cancel'):
+        pg.sendCancel(savetext or "", rev)
+        return
     # convert input from Graphical editor
     if lasteditor == 'gui':
         from MoinMoin.converter.text_html_text_x_moin import convert
@@ -579,10 +582,7 @@
 
     comment = wikiutil.clean_comment(comment)
 
-    # Edit was canceled
-    if request.form.has_key('button_cancel'):
-        pg.sendCancel(savetext or "", rev)
-        return
+   
 
     # Add category
 
