From: Jakub Narebski Date: Tue, 31 Oct 2006 16:43:13 GMT Subject: [PATCH 8/n] gitweb: Fix two issues with quoted filenames in git_patchset_body Message-ID: <200610311743.14032.jnareb@gmail.com> In-Reply-To: <200610301953.01875.jnareb@gmail.com> This fixes the following (minor) bugs: * gitweb didn't remove quoted filenames from "git diff" header * the filename in to-file +++ header used esc_html not esc_path Signed-off-by: Jakub Narebski --- gitweb/gitweb.perl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index e0f7a3f..837b88e 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -2114,7 +2114,7 @@ sub git_patchset_body { $patch_idx++; # print "git diff" header - $patch_line =~ s!^(diff (.*?) )a/.*$!$1!; + $patch_line =~ s!^(diff (.*?) )"?a/.*$!$1!; if ($from{'href'}) { $patch_line .= $cgi->a({-href => $from{'href'}, -class => "path"}, 'a/' . esc_path($from{'file'})); @@ -2191,7 +2191,7 @@ sub git_patchset_body { if ($to{'href'}) { $patch_line = '+++ b/' . $cgi->a({-href=>$to{'href'}, -class=>"path"}, - esc_html($to{'file'})); + esc_path($to{'file'})); } print "
$patch_line
\n"; -- 1.4.3.3