summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-04-22 00:10:20 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-04-22 00:10:20 -0700
commitbdb87afb4b425d97f7b5e957cbed1589969d9a24 (patch)
tree32b46fd09198fa1bc88d793992cfad5dfb6f00ef /gitweb
parentcompletion: remove use of dashed git commands (diff)
parentpost-receive-email: fix accidental removal of a trailing space in signature line (diff)
downloadtgif-bdb87afb4b425d97f7b5e957cbed1589969d9a24.tar.xz
Merge branch 'maint'
* maint: post-receive-email: fix accidental removal of a trailing space in signature line Escape project names before creating pathinfo URLs Escape project name in regexp bash: Add completion for git diff --base --ours --theirs diff-options.txt: document the new "--dirstat" option
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl6
1 files changed, 3 insertions, 3 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a48bebb1bc..f83567ec39 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -511,7 +511,7 @@ sub evaluate_path_info {
}
# do not change any parameters if an action is given using the query string
return if $action;
- $path_info =~ s,^$project/*,,;
+ $path_info =~ s,^\Q$project\E/*,,;
my ($refname, $pathname) = split(/:/, $path_info, 2);
if (defined $pathname) {
# we got "project.git/branch:filename" or "project.git/branch:dir/"
@@ -633,7 +633,7 @@ sub href(%) {
my ($use_pathinfo) = gitweb_check_feature('pathinfo');
if ($use_pathinfo) {
# use PATH_INFO for project name
- $href .= "/$params{'project'}" if defined $params{'project'};
+ $href .= "/".esc_url($params{'project'}) if defined $params{'project'};
delete $params{'project'};
# Summary just uses the project path URL
@@ -2575,7 +2575,7 @@ EOF
my $action = $my_uri;
my ($use_pathinfo) = gitweb_check_feature('pathinfo');
if ($use_pathinfo) {
- $action .= "/$project";
+ $action .= "/".esc_url($project);
} else {
$cgi->param("p", $project);
}