Permalink
Browse files

Item13926: Don't use Foswiki::decode_utf8 on 1.1.x

Needs testing.
  • Loading branch information...
gac410 committed Jan 17, 2016
1 parent 25cd091 commit 6b2851af0ad92018dcf3369bffd602c1465850f2
Showing with 11 additions and 5 deletions.
  1. +11 −5 ModPerlEngineContrib/lib/Foswiki/Engine/Apache.pm
@@ -214,8 +214,11 @@ sub prepareUploads {
my %uploads;
if ( $this->{query}->isa('CGI') ) {
foreach my $key ( keys %{ $this->{uploads} } ) {
my $fname = $this->{query}->param($key);
my $ufname = NFC( Foswiki::decode_utf8($fname) );
my $fname = $this->{query}->param($key);
my $ufname =
($Foswiki::UNICODE)
? NFC( Foswiki::decode_utf8($fname) )
: $fname;
$uploads{$ufname} = new Foswiki::Request::Upload(
headers => $this->{query}->uploadInfo($fname),
tmpname => $this->{query}->tmpFileName($fname),
@@ -225,11 +228,14 @@ sub prepareUploads {
else {
foreach my $key ( keys %{ $this->{uploads} } ) {
my $obj = $this->{query}->upload($key);
$uploads{ NFC( Foswiki::decode_utf8( $obj->filename ) ) } =
new Foswiki::Request::Upload(
my $ufname =
($Foswiki::UNICODE)
? NFC( Foswiki::decode_utf8( $obj->filename ) )
: $obj->filename;
$uploads{$ufname} = new Foswiki::Request::Upload(
headers => $obj->info,
tmpname => $obj->tempname,
);
);
}
}
delete $this->{uploads};

0 comments on commit 6b2851a

Please sign in to comment.