1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-03 12:16:16 +02:00

Merge branch 'gb/maint-gitweb-esc-param' into maint

* gb/maint-gitweb-esc-param:
  gitweb: fix esc_param
This commit is contained in:
Junio C Hamano 2009-11-15 16:37:39 -08:00
commit 14d52b2815

View File

@ -1083,8 +1083,7 @@ sub to_utf8 {
# correct, but quoted slashes look too horrible in bookmarks
sub esc_param {
my $str = shift;
$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;
}