stagit
static git repository generator
git clone https://9o.is/git/stagit.git
commit 27cf6de25fb91e80fc2990078df2395a7f9118ee parent ec194deedc2f8152e950fb2889985783cb020f26 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 4 Jan 2016 23:41:40 +0100 stagit: fix hunk header, thanks uggedal for reporting! Diffstat:
| M | stagit.c | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/stagit.c b/stagit.c @@ -409,7 +409,9 @@ printshowfile(struct commitinfo *ci) if (git_patch_get_hunk(&hunk, &nhunklines, patch, j)) break; - fprintf(fp, "<span class=\"h\">%s</span>\n", hunk->header); + fputs("<span class=\"h\">", fp); + xmlencode(fp, hunk->header, strcspn(hunk->header, "\n")); + fputs("</span>", fp); for (k = 0; ; k++) { if (git_patch_get_line_in_hunk(&line, patch, j, k))