diff options
author | Hiltjo Posthuma <[email protected]> | 2016-01-04 23:41:40 +0100 |
---|---|---|
committer | Hiltjo Posthuma <[email protected]> | 2016-01-04 23:41:40 +0100 |
commit | a89e756c9e59d41cb1e392616333be50b3960c71 (patch) | |
tree | c6f726c6f3b04ecde76db9926bfe586455a063ca /stagit.c | |
parent | 122af5015df461ee21f8543f1f503c884ef334c2 (diff) | |
download | stagit-a89e756c9e59d41cb1e392616333be50b3960c71.tar.gz stagit-a89e756c9e59d41cb1e392616333be50b3960c71.zip |
stagit: fix hunk header, thanks uggedal for reporting!
Diffstat (limited to '')
-rw-r--r-- | stagit.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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)) |