aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/CGI.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-29 10:17:30 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-29 10:17:30 -0400
commitce785c87022842a53eda6a25088eb4299907f938 (patch)
treeb37132c2290a364ba20021f793b519ec361d68ed /IkiWiki/CGI.pm
parentae7591fd18e4d96666971b8f5707dafd62b8d1e2 (diff)
downloadikiwiki-ce785c87022842a53eda6a25088eb4299907f938.tar
ikiwiki-ce785c87022842a53eda6a25088eb4299907f938.tar.gz
fix url encoding in redir
When redirecting to a page, ie, after editing, ensure that the url is uri-encoded. Most browsers other than MSIE don't care, but it's the right thing to do. The known failure case involved editing a page that had utf-8 in the name using MSIE.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r--IkiWiki/CGI.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 52cafade0..9277223f0 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -40,7 +40,8 @@ sub showform ($$$$;@) {
sub redirect ($$) {
my $q=shift;
- my $url=shift;
+ eval q{use URI};
+ my $url=URI->new(shift);
if (! $config{w3mmode}) {
print $q->redirect($url);
}