Skip to content

Commit

Permalink
Merge branch 'gb/maint-gitweb-esc-param' into maint
Browse files Browse the repository at this point in the history
* gb/maint-gitweb-esc-param:
  gitweb: fix esc_param
  • Loading branch information
gitster committed Nov 16, 2009
2 parents 9453f8a + 452e225 commit 14d52b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 14d52b2

Please sign in to comment.