Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'gb/maint-gitweb-esc-param' into maint
author
Junio C Hamano
<gitster@pobox.com>
Mon, 16 Nov 2009 00:37:39 +0000
(16:37 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 16 Nov 2009 00:37:39 +0000
(16:37 -0800)
* gb/maint-gitweb-esc-param:
gitweb: fix esc_param
gitweb/gitweb.perl
patch
|
blob
|
history
raw
(from parent 1:
9453f8a
)
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index c939e2434d5901f0de50c649c5443c026d545a98..59dca7d3ada7505f155e4aa7890e03b775043212 100755
(executable)
--- 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;
}