stagit

stagit: fix hunk header, thanks uggedal for reporting!

Hiltjo Posthuma contact@arjunchoudhary.com

commit: 8c647c9 parent: e519f94
1 files changed, 3 insertions(+), 1 deletions(-)
Mstagit.c+3-1
M · stagit.c +3, -1
 1@@ -409,7 +409,9 @@ printshowfile(struct commitinfo *ci)
 2 			if (git_patch_get_hunk(&hunk, &nhunklines, patch, j))
 3 				break;
 4 
 5-			fprintf(fp, "<span class=\"h\">%s</span>\n", hunk->header);
 6+			fputs("<span class=\"h\">", fp);
 7+			xmlencode(fp, hunk->header, strcspn(hunk->header, "\n"));
 8+			fputs("</span>", fp);
 9 
10 			for (k = 0; ; k++) {
11 				if (git_patch_get_line_in_hunk(&line, patch, j, k))