projects
/
forks
/
stagit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
122af50
)
stagit: fix hunk header, thanks uggedal for reporting!
author
Hiltjo Posthuma
<hiltjo@codemadness.org>
Mon, 4 Jan 2016 22:41:40 +0000
(23:41 +0100)
committer
Hiltjo Posthuma
<hiltjo@codemadness.org>
Mon, 4 Jan 2016 22:41:40 +0000
(23:41 +0100)
stagit.c
patch
|
blob
|
history
diff --git
a/stagit.c
b/stagit.c
index 026992c96c6b22da4de06cb70b5beee7daf2c751..27db7a65175005489ce8a815834af9a5f62c83ca 100644
(file)
--- 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))