Skip to content

Commit

Permalink
gitweb: escape tag comments
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
Daniel Drake authored and Junio C Hamano committed Jul 25, 2006
1 parent 09f5dc4 commit 143c89b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitweb/gitweb.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ sub git_summary {
"</td>\n" .
"<td>";
if (defined($comment)) {
print $cgi->a({-class => "list", -href => "$my_uri?" . esc_param("p=$project;a=tag;h=$tag{'id'}")}, $comment);
print $cgi->a({-class => "list", -href => "$my_uri?" . esc_param("p=$project;a=tag;h=$tag{'id'}")}, esc_html($comment));
}
print "</td>\n" .
"<td class=\"link\">";
Expand Down

0 comments on commit 143c89b

Please sign in to comment.