diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-11-15 16:37:39 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-15 16:37:39 -0800 |
commit | 14d52b28158ba7922adfc00ee488f934ef6d0593 (patch) | |
tree | 3fb6e7451d24274eb48bd00b2b9ff479065c9a62 /gitweb | |
parent | 9453f8aa070bd75bc5fc4bc007223386ab85bb7a (diff) | |
parent | 452e2256d2d7cb5494ca10fcbbb6bdf29570f2c0 (diff) | |
download | git-14d52b28158ba7922adfc00ee488f934ef6d0593.tar.gz |
Merge branch 'gb/maint-gitweb-esc-param' into maint
* 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 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; } |