summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-05 18:20:25 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-05 18:20:25 +0000
commit56378a14e2c41902d8d97bf51d26446e42a83ab3 (patch)
tree7d84a47ea062f85773d2284cde881ef3ec2bf124
parent97e6f39dd0643ec9ce2f9d3488941d9e768c4392 (diff)
Encode:: cleanup from Recai
-rw-r--r--IkiWiki/CGI.pm12
-rw-r--r--IkiWiki/Render.pm6
2 files changed, 9 insertions, 9 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 424ce2c78..3b4228b75 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -316,7 +316,7 @@ sub cgi_editpage ($$) { #{{{
# This untaint is safe because titlepage removes any problimatic
# characters.
- my ($page)=Encode::decode_utf8($form->param('page'));
+ my ($page)=decode_utf8($form->param('page'));
$page=titlepage(possibly_foolish_untaint(lc($page)));
if (! defined $page || ! length $page ||
$page=~/$config{wiki_file_prune_regexp}/ || $page=~/^\//) {
@@ -363,8 +363,8 @@ sub cgi_editpage ($$) { #{{{
require IkiWiki::Render;
# Apparently FormBuilder doesn't not treat input as
# utf-8, so decode from it.
- my $content = Encode::decode_utf8($form->field('editcontent'));
- my $comments = Encode::decode_utf8($form->field('comments'));
+ my $content=decode_utf8($form->field('editcontent'));
+ my $comments=decode_utf8($form->field('comments'));
$form->field(name => "editcontent",
value => $content, force => 1);
$form->field(name => "comments",
@@ -452,7 +452,7 @@ sub cgi_editpage ($$) { #{{{
page_locked($page, $session);
# Decode utf-8 since FormBuilder does not
- my $content=Encode::decode_utf8($form->field('editcontent'));
+ my $content=decode_utf8($form->field('editcontent'));
$content=~s/\r\n/\n/g;
$content=~s/\r/\n/g;
@@ -468,7 +468,7 @@ sub cgi_editpage ($$) { #{{{
}
if (defined $form->field('comments') &&
length $form->field('comments')) {
- $message.=": ".Encode::decode_utf8($form->field('comments'));
+ $message.=": ".decode_utf8($form->field('comments'));
}
if ($config{rcs}) {
@@ -487,7 +487,7 @@ sub cgi_editpage ($$) { #{{{
force => 1);
$form->tmpl_param("page_conflict", 1);
$form->field("editcontent", value => $conflict, force => 1);
- $form->field(name => "comments", value => Encode::decode_utf8($form->field('comments')), force => 1);
+ $form->field(name => "comments", value => decode_utf8($form->field('comments')), force => 1);
$form->field("do", "edit)");
$form->tmpl_param("page_select", 0);
$form->field(name => "page", type => 'hidden');
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index ab43717c6..6d5ea9ee5 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -222,7 +222,7 @@ sub displaytime ($) { #{{{
eval q{use POSIX};
# strftime doesn't know about encodings, so make sure
# its output is properly treated as utf8
- return Encode::decode_utf8(POSIX::strftime(
+ return decode_utf8(POSIX::strftime(
$config{timeformat}, localtime($time)));
} #}}}
@@ -310,7 +310,7 @@ sub refresh () { #{{{
find({
no_chdir => 1,
wanted => sub {
- $_ = Encode::decode_utf8($_);
+ $_=decode_utf8($_);
if (/$config{wiki_file_prune_regexp}/) {
$File::Find::prune=1;
}
@@ -330,7 +330,7 @@ sub refresh () { #{{{
find({
no_chdir => 1,
wanted => sub {
- $_ = Encode::decode_utf8($_);
+ $_=decode_utf8($_);
if (/$config{wiki_file_prune_regexp}/) {
$File::Find::prune=1;
}