summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-11-15 16:37:39 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-11-15 16:37:39 -0800
commit14d52b28158ba7922adfc00ee488f934ef6d0593 (patch)
tree3fb6e7451d24274eb48bd00b2b9ff479065c9a62 /gitweb
parentMerge branch 'jn/gitweb-patch' into maint (diff)
parentgitweb: fix esc_param (diff)
downloadtgif-14d52b28158ba7922adfc00ee488f934ef6d0593.tar.xz
Merge branch 'gb/maint-gitweb-esc-param' into maint
* gb/maint-gitweb-esc-param: gitweb: fix esc_param
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl3
1 files changed, 1 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c939e2434d..59dca7d3ad 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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;
}