{"thread":{"id":"4975","subject":"[PATCH] gitweb: escape tag comments","startedAt":"2006-07-24T22:07:23Z","lastAt":"2006-07-24T22:07:23Z","messageCount":1,"participants":["Daniel Drake"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"24073","messageId":"20060724220723.B5B6C7E3E43@zog.reactivated.net","threadId":"4975","inReplyTo":null,"subject":"[PATCH] gitweb: escape tag comments","fromName":"Daniel Drake","fromEmail":"dsd@gentoo.org","sentAt":"2006-07-24T22:07:23Z","receivedAt":"2006-07-24T22:07:23Z","isPatch":true,"sender":{"key":"dsd@gentoo.org","avatar":null},"body":"I have a tag with a comment which includes an & character. Firefox wouldn't\ndisplay my gitweb summary page due to malformed XML. This solves the problem.\n\nSigned-off-by: Daniel Drake <dsd@gentoo.org>\n\ndiff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi\nindex 2fd1e5f..5acd66d 100755\n--- a/gitweb/gitweb.cgi\n+++ b/gitweb/gitweb.cgi\n@@ -1138,7 +1138,7 @@ sub git_summary {\n \t\t\t\t      \"</td>\\n\" .\n \t\t\t\t      \"<td>\";\n \t\t\t\tif (defined($comment)) {\n-\t\t\t\t      print $cgi->a({-class => \"list\", -href => \"$my_uri?\" . esc_param(\"p=$project;a=tag;h=$tag{'id'}\")}, $comment);\n+\t\t\t\t      print $cgi->a({-class => \"list\", -href => \"$my_uri?\" . esc_param(\"p=$project;a=tag;h=$tag{'id'}\")}, esc_html($comment));\n \t\t\t\t}\n \t\t\t\tprint \"</td>\\n\" .\n \t\t\t\t      \"<td class=\\\"link\\\">\";\n"}]}