Mercurial > pub > Impl
diff Lib/IMPL/Web/QueryHandler/PageFormat.pm @ 171:59e5fcb59d86
Исправления, изменена концепция веб-форм
author | sourcer |
---|---|
date | Mon, 06 Jun 2011 03:30:36 +0400 |
parents | 4267a2ac3d46 |
children | d1676be8afcc |
line wrap: on
line diff
--- a/Lib/IMPL/Web/QueryHandler/PageFormat.pm Tue May 24 01:11:16 2011 +0400 +++ b/Lib/IMPL/Web/QueryHandler/PageFormat.pm Mon Jun 06 03:30:36 2011 +0400 @@ -8,11 +8,12 @@ use IMPL::Class::Property; use IMPL::Web::TT::Document; use Template::Plugin::URL; -use IMPL::Security::Context; -use File::Spec; -use HTML::TreeBuilder; -use URI; +use IMPL::Security::Context(); +use File::Spec(); +use HTML::TreeBuilder(); +use URI(); use Error qw(:try); +use Encode(); $Template::Plugin::URL::JOINT = '&'; @@ -44,7 +45,7 @@ $this->templatesBase($ENV{DOCUMENT_ROOT}) unless $this->templatesBase; - my ($requestUri) = split /\?/, $ENV{REQUEST_URI}; + my ($requestUri) = split( /\?/, $ENV{REQUEST_URI} ); my $pathInfo; my @root = (''); @@ -125,7 +126,7 @@ my $clone = $this->clone; if (ref $params eq 'HASH' ) { my %newParams = ($clone->query_form , %$params); - $clone->query_form(map { $_, $newParams{$_} } sort keys %newParams ); + $clone->query_form(map { $_, ( Encode::is_utf8( $newParams{$_} ) ? Encode::encode('utf-8', $newParams{$_}) : $newParams{$_} ) } sort keys %newParams ); } return $clone; }