Skip to content

Commit ce312af

Browse files
jnarebgitster
authored andcommitted
gitweb: Fix escaping HTML of project owner in 'projects_list' and
'summary' views This for example allows to put email address in the project owner field in the projects index file (when $projects_list points to a file, and not to a directory), in the form of: path/to/repo.git Random+J+Developer+<[email protected]> Noticed-by: Jon Smirl <[email protected]> Signed-off-by: Jakub Narebski <[email protected]> Signed-off-by: Petr Baudis <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a005085 commit ce312af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitweb/gitweb.perl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3419,7 +3419,7 @@ sub git_project_list_body {
34193419
"<td>" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
34203420
-class => "list", -title => $pr->{'descr_long'}},
34213421
esc_html($pr->{'descr'})) . "</td>\n" .
3422-
"<td><i>" . chop_str($pr->{'owner'}, 15) . "</i></td>\n";
3422+
"<td><i>" . esc_html(chop_str($pr->{'owner'}, 15)) . "</i></td>\n";
34233423
print "<td class=\"". age_class($pr->{'age'}) . "\">" .
34243424
(defined $pr->{'age_string'} ? $pr->{'age_string'} : "No commits") . "</td>\n" .
34253425
"<td class=\"link\">" .
@@ -3795,7 +3795,7 @@ sub git_summary {
37953795
print "<div class=\"title\">&nbsp;</div>\n";
37963796
print "<table cellspacing=\"0\">\n" .
37973797
"<tr><td>description</td><td>" . esc_html($descr) . "</td></tr>\n" .
3798-
"<tr><td>owner</td><td>$owner</td></tr>\n";
3798+
"<tr><td>owner</td><td>" . esc_html($owner) . "</td></tr>\n";
37993799
if (defined $cd{'rfc2822'}) {
38003800
print "<tr><td>last change</td><td>$cd{'rfc2822'}</td></tr>\n";
38013801
}

0 commit comments

Comments
 (0)