@matheusbsbs / matheus-bagliano / commits / ce312affa1
Fork 0

gitweb: Fix escaping HTML of project owner in 'projects_list' and 'summary' views

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+<random@developer.example.org> Noticed-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jakub Narebski committed Aug 28, 2007 at 16:05 UTC ce312affa1487b2b3857da7de5cca35d35f3baa7
1 file changed +2 -2
gitweb/gitweb.perl
+2 -2
@@ -3419,7 +3419,7 @@ sub git_project_list_body {
3419 "<td>" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
3420 -class => "list", -title => $pr->{'descr_long'}},
3421 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";
3423 print "<td class=\"". age_class($pr->{'age'}) . "\">" .
3424 (defined $pr->{'age_string'} ? $pr->{'age_string'} : "No commits") . "</td>\n" .
3425 "<td class=\"link\">" .
@@ -3795,7 +3795,7 @@ sub git_summary {
3795 print "<div class=\"title\">&nbsp;</div>\n";
3796 print "<table cellspacing=\"0\">\n" .
3797 "<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";
3799 if (defined $cd{'rfc2822'}) {
3800 print "<tr><td>last change</td><td>$cd{'rfc2822'}</td></tr>\n";
3801 }