From: Daniel Drake Date: Mon, 24 Jul 2006 22:07:23 +0000 (+0100) Subject: gitweb: escape tag comments X-Git-Tag: v1.4.2-rc2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=143c89b00348759d2768003d57e0f506d281dc61;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index 2fd1e5f78..5acd66dd6 100755 --- a/gitweb/gitweb.cgi +++ b/gitweb/gitweb.cgi @@ -1138,7 +1138,7 @@ sub git_summary { "\n" . ""; 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 "\n" . "";