Skip to content

Commit

Permalink
Merge branch 'gb/maint-gitweb-esc-param'
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 Oct 22, 2009
2 parents a9d7c95 + 452e225 commit 8e850a4
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 @@ -1096,8 +1096,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 8e850a4

Please sign in to comment.