Git 1.7.1.3
[gitweb.git] / gitweb / gitweb.perl
index c356e95f18f0f784584ce644c08e1966ca1be52f..a97ce03444e4ca24273dff32d9e7b9bbc874aa41 100755 (executable)
@@ -1173,8 +1173,7 @@ sub esc_param {
 sub esc_url {
        my $str = shift;
        return undef unless defined $str;
-       $str =~ s/([^A-Za-z0-9\-_.~();\/;?:@&=])/sprintf("%%%02X", ord($1))/eg;
-       $str =~ s/\+/%2B/g;
+       $str =~ s/([^A-Za-z0-9\-_.~();\/;?:@&= ]+)/CGI::escape($1)/eg;
        $str =~ s/ /\+/g;
        return $str;
 }