aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/CGI.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-03 20:12:27 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-03 20:12:27 +0000
commitfa9517e5bb07fad29fddb219e6c8e8f1b0a08d7e (patch)
treed04771c376accfbf57a699f728da095a30f23702 /IkiWiki/CGI.pm
parent117e71ec9b4fe6a37fd9fa07b8fa2117306bb9a6 (diff)
downloadikiwiki-fa9517e5bb07fad29fddb219e6c8e8f1b0a08d7e.tar
ikiwiki-fa9517e5bb07fad29fddb219e6c8e8f1b0a08d7e.tar.gz
* Support pages with utf8 filenames. Patch by Faidon Liambotis.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r--IkiWiki/CGI.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index d069de8dc..b2d126977 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -308,7 +308,8 @@ sub cgi_editpage ($$) { #{{{
# This untaint is safe because titlepage removes any problimatic
# characters.
- my ($page)=titlepage(possibly_foolish_untaint(lc($form->param('page'))));
+ my ($page)=Encode::decode_utf8($form->param('page'));
+ $page=titlepage(possibly_foolish_untaint(lc($page)));
if (! defined $page || ! length $page ||
$page=~/$config{wiki_file_prune_regexp}/ || $page=~/^\//) {
error("bad page name");
@@ -353,10 +354,11 @@ sub cgi_editpage ($$) { #{{{
# utf-8, so decode from it.
require Encode;
my $content = Encode::decode_utf8($form->field('editcontent'));
+ my $comments = Encode::decode_utf8($form->field('comments'));
$form->field(name => "editcontent",
value => $content, force => 1);
$form->field(name => "comments",
- value => Encode::decode_utf8($form->field('comments')), force => 1);
+ value => $comments, force => 1);
$form->tmpl_param("page_preview",
htmlize($config{default_pageext},
linkify($page, $page, $content)));
@@ -457,7 +459,7 @@ sub cgi_editpage ($$) { #{{{
}
if (defined $form->field('comments') &&
length $form->field('comments')) {
- $message.=Encode::decode_utf8(": ".$form->field('comments'));
+ $message.=": ".Encode::decode_utf8($form->field('comments'));
}
if ($config{rcs}) {