@matheusbsbs / matheus-bagliano / commits / 143c89b003
Fork 0

gitweb: escape tag comments

I have a tag with a comment which includes an & character. Firefox wouldn't display my gitweb summary page due to malformed XML. This solves the problem. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Daniel Drake committed Jul 24, 2006 at 23:07 UTC 143c89b00348759d2768003d57e0f506d281dc61
1 file changed +1 -1
gitweb/gitweb.cgi
+1 -1
@@ -1138,7 +1138,7 @@ sub git_summary {
1138 "</td>\n" .
1139 "<td>";
1140 if (defined($comment)) {
1141 - print $cgi->a({-class => "list", -href => "$my_uri?" . esc_param("p=$project;a=tag;h=$tag{'id'}")}, $comment);
1141 + print $cgi->a({-class => "list", -href => "$my_uri?" . esc_param("p=$project;a=tag;h=$tag{'id'}")}, esc_html($comment));
1142 }
1143 print "</td>\n" .
1144 "<td class=\"link\">";