зеркало из https://github.com/microsoft/git.git
gitweb: Drop the href() params which keys are not in %mapping
If someone would enter parameter name incorrectly, and some key of
%params is not found in %mapping hash, the parameter is now
ignored. Change introduced by Martin Waitz in commit
756d2f064b
tried to do that, but it left empty value and there was doubled ";;"
in returned string.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
59b9f61a3f
Коммит
1149fecfc2
|
@ -285,7 +285,7 @@ sub href(%) {
|
|||
my $href = "$my_uri?";
|
||||
$href .= esc_param( join(";",
|
||||
map {
|
||||
"$mapping{$_}=$params{$_}" if defined $params{$_}
|
||||
defined $params{$_} ? "$mapping{$_}=$params{$_}" : ()
|
||||
} keys %params
|
||||
) );
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче