t1501 (rev-parse): clarify
[gitweb.git] / gitweb / gitweb.perl
index 1f611d22d4c4d5b00491f98eff5c4749900333e9..cedc3573136922d424971ef2a16feeb82496c37d 100755 (executable)
@@ -1327,8 +1327,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;
 }