X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=ucw%2Fperl%2FUCW%2FCGI.pm;h=a18ee8eaa568bc8bf0e866404ea21a9b06418ffa;hb=77c84c65dc22afe21bc52d95cd3996b8e1c7d065;hp=f81bd3ea300da22776457a5cf0b52ed34f17791b;hpb=5453cb799a65190b348028302249af928c58cee4;p=libucw.git diff --git a/ucw/perl/UCW/CGI.pm b/ucw/perl/UCW/CGI.pm index f81bd3ea..a18ee8ea 100644 --- a/ucw/perl/UCW/CGI.pm +++ b/ucw/perl/UCW/CGI.pm @@ -50,8 +50,10 @@ sub url_deescape($) { sub url_param_escape($) { my $x = shift @_; defined $x or return; - $x = url_escape($x); + utf8::encode($x) if $utf8_mode; + $x =~ s/([^-\$_.!*'(),0-9A-Za-z])/"%".unpack('H2',$1)/ge; $x =~ s/%20/+/g; + utf8::decode($x) if $utf8_mode; return $x; }