From: Jakub Narebski Date: Sun, 12 Feb 2012 15:21:30 +0000 (+0100) Subject: gitweb: Harden and improve $project_filter page title X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/8c5876e8803cb89d50d4ee6b5f8259941844b941a9425534e36b4a2f581244d7 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index df001ad..dac4129 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -3745,7 +3745,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; }