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>
This commit is contained in:
parent
ce58ec9158
commit
d3cd249565
@ -3412,7 +3412,7 @@ sub git_project_list_body {
|
|||||||
"<td>" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
|
"<td>" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
|
||||||
-class => "list", -title => $pr->{'descr_long'}},
|
-class => "list", -title => $pr->{'descr_long'}},
|
||||||
esc_html($pr->{'descr'})) . "</td>\n" .
|
esc_html($pr->{'descr'})) . "</td>\n" .
|
||||||
"<td><i>" . esc_html(chop_str($pr->{'owner'}, 15)) . "</i></td>\n";
|
"<td><i>" . chop_and_escape_str($pr->{'owner'}, 15) . "</i></td>\n";
|
||||||
print "<td class=\"". age_class($pr->{'age'}) . "\">" .
|
print "<td class=\"". age_class($pr->{'age'}) . "\">" .
|
||||||
(defined $pr->{'age_string'} ? $pr->{'age_string'} : "No commits") . "</td>\n" .
|
(defined $pr->{'age_string'} ? $pr->{'age_string'} : "No commits") . "</td>\n" .
|
||||||
"<td class=\"link\">" .
|
"<td class=\"link\">" .
|
||||||
@ -3667,7 +3667,7 @@ sub git_search_grep_body {
|
|||||||
"<td><i>" . $author . "</i></td>\n" .
|
"<td><i>" . $author . "</i></td>\n" .
|
||||||
"<td>" .
|
"<td>" .
|
||||||
$cgi->a({-href => href(action=>"commit", hash=>$co{'id'}), -class => "list subject"},
|
$cgi->a({-href => href(action=>"commit", hash=>$co{'id'}), -class => "list subject"},
|
||||||
esc_html(chop_str($co{'title'}, 50)) . "<br/>");
|
chop_and_escape_str($co{'title'}, 50) . "<br/>");
|
||||||
my $comment = $co{'comment'};
|
my $comment = $co{'comment'};
|
||||||
foreach my $line (@$comment) {
|
foreach my $line (@$comment) {
|
||||||
if ($line =~ m/^(.*)($search_regexp)(.*)$/i) {
|
if ($line =~ m/^(.*)($search_regexp)(.*)$/i) {
|
||||||
@ -5183,7 +5183,7 @@ sub git_search {
|
|||||||
"<td>" .
|
"<td>" .
|
||||||
$cgi->a({-href => href(action=>"commit", hash=>$co{'id'}),
|
$cgi->a({-href => href(action=>"commit", hash=>$co{'id'}),
|
||||||
-class => "list subject"},
|
-class => "list subject"},
|
||||||
esc_html(chop_str($co{'title'}, 50)) . "<br/>");
|
chop_and_escape_str($co{'title'}, 50) . "<br/>");
|
||||||
while (my $setref = shift @files) {
|
while (my $setref = shift @files) {
|
||||||
my %set = %$setref;
|
my %set = %$setref;
|
||||||
print $cgi->a({-href => href(action=>"blob", hash_base=>$co{'id'},
|
print $cgi->a({-href => href(action=>"blob", hash_base=>$co{'id'},
|
||||||
|
Loading…
Reference in New Issue
Block a user