Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'gb/maint-gitweb-esc-param'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 22 Oct 2009 00:32:59 +0000
(17:32 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 22 Oct 2009 00:32:59 +0000
(17:32 -0700)
* gb/maint-gitweb-esc-param:
gitweb: fix esc_param
gitweb/gitweb.perl
patch
|
blob
|
history
raw
(from parent 1:
a9d7c95
)
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index d6eb7291d66ffc8a6dc6ecc331d44f3652c5a98f..c9e2af67ca5296af06de0e9d622eec272f7d5943 100755
(executable)
--- 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;
}