Skip to content

Commit 14d52b2

Browse files
committed
Merge branch 'gb/maint-gitweb-esc-param' into maint
* gb/maint-gitweb-esc-param: gitweb: fix esc_param
2 parents 9453f8a + 452e225 commit 14d52b2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gitweb/gitweb.perl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,8 +1083,7 @@ sub to_utf8 {
10831083
# correct, but quoted slashes look too horrible in bookmarks
10841084
sub esc_param {
10851085
my $str = shift;
1086-
$str =~ s/([^A-Za-z0-9\-_.~()\/:@])/sprintf("%%%02X", ord($1))/eg;
1087-
$str =~ s/\+/%2B/g;
1086+
$str =~ s/([^A-Za-z0-9\-_.~()\/:@ ]+)/CGI::escape($1)/eg;
10881087
$str =~ s/ /\+/g;
10891088
return $str;
10901089
}

0 commit comments

Comments
 (0)