Skip to content

Commit f421208

Browse files
jnarebgitster
authored andcommitted
gitweb: Harden and improve $project_filter page title
Commit 19d2d23 (gitweb: add project_filter to limit project list to a subdirectory, 2012-01-30) added also support for displaying $project_filter, if present, in page title. Unfortunately it forgot to treat $project_filter as path, and escape it using esc_path(), like it is done for $filename. Also, it was not obvious that "$site_name - $project_filter" is about project filtering: use "$site_name - projects in '$project_filter'". Signed-off-by: Jakub Narebski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent abc0c9d commit f421208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitweb/gitweb.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3742,7 +3742,7 @@ sub get_page_title {
37423742

37433743
unless (defined $project) {
37443744
if (defined $project_filter) {
3745-
$title .= " - " . to_utf8($project_filter);
3745+
$title .= " - projects in '" . esc_path($project_filter) . "'";
37463746
}
37473747
return $title;
37483748
}

0 commit comments

Comments
 (0)