summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-10-21 17:32:59 -0700
committerJunio C Hamano <gitster@pobox.com>2009-10-21 17:32:59 -0700
commit8e850a4dbdcda5e7be8367d81fef3f70da0e8294 (patch)
treeb7e6d0508efeab58f3dfb5532f24ee9f64ff8cf5 /gitweb
parenta9d7c9552e471b862f73951b2f2e5945f0f051b4 (diff)
parent452e2256d2d7cb5494ca10fcbbb6bdf29570f2c0 (diff)
downloadgit-8e850a4dbdcda5e7be8367d81fef3f70da0e8294.tar.gz
Merge branch 'gb/maint-gitweb-esc-param'
* 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 d6eb7291d6..c9e2af67ca 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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;
}