]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/CGI.pm
Put in a quick fix for a bug involving page preview while creating a page
[ikiwiki.git] / IkiWiki / CGI.pm
index f472413b80765be538d293b82ec77297f5a45102..89047a9525f43957e2c7ab08425cefcc7979ea1a 100644 (file)
@@ -355,7 +355,9 @@ sub cgi_editpage ($$) { #{{{
                        my ($from)=$form->param('from')=~/$config{wiki_file_regexp}/;
                        if (! defined $from || ! length $from ||
                            $from ne $form->param('from') ||
-                           $from=~/$config{wiki_file_prune_regexp}/ || $from=~/^\//) {
+                           $from=~/$config{wiki_file_prune_regexp}/ ||
+                           $from=~/^\// ||
+                           $form->submitted eq "Preview") {
                                @page_locs=$best_loc=$page;
                        }
                        else {