Skip to content

Commit

Permalink
gitweb: Harden and improve $project_filter page title
Browse files Browse the repository at this point in the history
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 <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Feb 13, 2012
1 parent abc0c9d commit f421208
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -3742,7 +3742,7 @@ sub get_page_title {

unless (defined $project) {
if (defined $project_filter) {
$title .= " - " . to_utf8($project_filter);
$title .= " - projects in '" . esc_path($project_filter) . "'";
}
return $title;
}
Expand Down

0 comments on commit f421208

Please sign in to comment.