From 961cf0f9d86e1e043d80398e4a71d218c28123a0 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Tue, 16 Nov 2021 11:44:23 +0100 Subject: [PATCH] encode the name, it could contain XML entities Like ", which would unquote the attribute value. Crazy but true. --- stagit.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stagit.c b/stagit.c index d8fbc64..d637691 100644 --- a/stagit.c +++ b/stagit.c @@ -480,10 +480,12 @@ writeheader(FILE *fp, const char *title) fputs(" - ", fp); xmlencode(fp, description, strlen(description)); fprintf(fp, "\n\n", relpath); - fprintf(fp, "\n", - name, relpath); - fprintf(fp, "\n", - name, relpath); + fputs("\n", relpath); + fputs("\n", relpath); fprintf(fp, "\n", relpath); fputs("\n\n
", fp); fprintf(fp, "\"\"", -- 2.30.2