Skip to content

Commit d3cd249

Browse files
dsymondsgitster
authored andcommitted
gitweb: Use chop_and_escape_str in more places.
Signed-off-by: David Symonds <dsymonds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent ce58ec9 commit d3cd249

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gitweb/gitweb.perl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3412,7 +3412,7 @@ sub git_project_list_body {
34123412
"<td>" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
34133413
-class => "list", -title => $pr->{'descr_long'}},
34143414
esc_html($pr->{'descr'})) . "</td>\n" .
3415-
"<td><i>" . esc_html(chop_str($pr->{'owner'}, 15)) . "</i></td>\n";
3415+
"<td><i>" . chop_and_escape_str($pr->{'owner'}, 15) . "</i></td>\n";
34163416
print "<td class=\"". age_class($pr->{'age'}) . "\">" .
34173417
(defined $pr->{'age_string'} ? $pr->{'age_string'} : "No commits") . "</td>\n" .
34183418
"<td class=\"link\">" .
@@ -3667,7 +3667,7 @@ sub git_search_grep_body {
36673667
"<td><i>" . $author . "</i></td>\n" .
36683668
"<td>" .
36693669
$cgi->a({-href => href(action=>"commit", hash=>$co{'id'}), -class => "list subject"},
3670-
esc_html(chop_str($co{'title'}, 50)) . "<br/>");
3670+
chop_and_escape_str($co{'title'}, 50) . "<br/>");
36713671
my $comment = $co{'comment'};
36723672
foreach my $line (@$comment) {
36733673
if ($line =~ m/^(.*)($search_regexp)(.*)$/i) {
@@ -5183,7 +5183,7 @@ sub git_search {
51835183
"<td>" .
51845184
$cgi->a({-href => href(action=>"commit", hash=>$co{'id'}),
51855185
-class => "list subject"},
5186-
esc_html(chop_str($co{'title'}, 50)) . "<br/>");
5186+
chop_and_escape_str($co{'title'}, 50) . "<br/>");
51875187
while (my $setref = shift @files) {
51885188
my %set = %$setref;
51895189
print $cgi->a({-href => href(action=>"blob", hash_base=>$co{'id'},

0 commit comments

Comments
 (0)