From 162b69828aa374f0bec24db58b05100afcb51b9a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 27 Aug 2012 09:38:23 -0700 Subject: [PATCH] Add single and double quotes to escaped characters in XML output We already escape '<', '>', and '&'. This adds the remaining two special entities in XML: '\'' and '\"'. Signed-off-by: Dirk Hohndel --- save-xml.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/save-xml.c b/save-xml.c index 37d6d06..6b08c95 100644 --- a/save-xml.c +++ b/save-xml.c @@ -97,6 +97,12 @@ static void quote(FILE *f, const char *text) case '&': escape = "&"; break; + case '\'': + escape = "'"; + break; + case '\"': + escape = """; + break; } fwrite(text, (p - text - 1), 1, f); if (!escape) -- 2.43.0