X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fperl%2FCGI.pm;h=462b0c43242ef41a7b1b3647c8605e249f5c05c1;hb=9f87c6fe6552ce8b2236a07307d2f825b0e4c439;hp=286bca52f7a4fa0c5636de9be6891b3b68e8fcd2;hpb=b0e111a2b5c5ebcb15e71359e4c5775d0d6a1fcc;p=libucw.git diff --git a/lib/perl/CGI.pm b/lib/perl/CGI.pm index 286bca52..462b0c43 100644 --- a/lib/perl/CGI.pm +++ b/lib/perl/CGI.pm @@ -23,7 +23,7 @@ BEGIN { sub url_escape($) { my $x = shift @_; - $x =~ s/([^-\$_.+!*'(),0-9A-Za-z\x80-\xff ])/"%".unpack('H2',$1)/ge; + $x =~ s/([^-\$_.!*'(),0-9A-Za-z\x80-\xff ])/"%".unpack('H2',$1)/ge; $x =~ s/ /+/g; return $x; } @@ -42,7 +42,7 @@ our $arg_table; sub parse_arg_string($) { my ($s) = @_; $s =~ s/\s+//; - foreach $_ (split /&/,$s) { + foreach $_ (split /[&:]/,$s) { (/^([^=]+)=(.*)$/) or next; my $arg = $arg_table->{$1} or next; $_ = $2; @@ -106,7 +106,7 @@ sub make_out_args($) { sub self_ref(@) { my %h = @_; my $out = make_out_args(\%h); - return "?" . join('&', map { "$_=" . url_escape($out->{$_}) } sort keys %$out); + return "?" . join(':', map { "$_=" . url_escape($out->{$_}) } sort keys %$out); } sub self_form(@) {