diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-10-21 17:32:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-10-21 17:32:59 -0700 |
commit | 8e850a4dbdcda5e7be8367d81fef3f70da0e8294 (patch) | |
tree | b7e6d0508efeab58f3dfb5532f24ee9f64ff8cf5 /gitweb | |
parent | a9d7c9552e471b862f73951b2f2e5945f0f051b4 (diff) | |
parent | 452e2256d2d7cb5494ca10fcbbb6bdf29570f2c0 (diff) | |
download | git-8e850a4dbdcda5e7be8367d81fef3f70da0e8294.tar.gz git-8e850a4dbdcda5e7be8367d81fef3f70da0e8294.tar.xz |
Merge branch 'gb/maint-gitweb-esc-param'
* gb/maint-gitweb-esc-param:
gitweb: fix esc_param
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.perl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index d6eb7291d..c9e2af67c 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; } |