poll: Use urlto to produce redirection URLs, avoiding mentions of index.html
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sun, 21 Sep 2008 17:23:33 +0000 (18:23 +0100)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sun, 21 Sep 2008 17:26:48 +0000 (18:26 +0100)
IkiWiki/Plugin/poll.pm

index 35717c85ff065511925712f6cd6b2482798cf659..84b02682e166eb72baf84b76ae18e0d9aad81b10 100644 (file)
@@ -102,7 +102,7 @@ sub sessioncgi ($$) { #{{{
                my $oldchoice=$session->param($choice_param);
                if (defined $oldchoice && $oldchoice eq $choice) {
                        # Same vote; no-op.
-                       IkiWiki::redirect($cgi, "$config{url}/".htmlpage($page));
+                       IkiWiki::redirect($cgi, urlto($page, undef, 1);
                        exit;
                }
 
@@ -149,7 +149,7 @@ sub sessioncgi ($$) { #{{{
                error($@) if $@;
                my $cookie = CGI::Cookie->new(-name=> $session->name, -value=> $session->id);
                print $cgi->redirect(-cookie => $cookie,
-                       -url => "$config{url}/".htmlpage($page));
+                       -url => urlto($page, undef, 1));
                exit;
        }
 } #}}}