From: Daniel Drake Date: Mon, 24 Jul 2006 22:07:23 GMT Subject: [PATCH] gitweb: escape tag comments Message-ID: <20060724220723.B5B6C7E3E43@zog.reactivated.net> 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 diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index 2fd1e5f..5acd66d 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" . "";