From: Dirk Hohndel Date: Mon, 27 Aug 2012 16:38:23 +0000 (-0700) Subject: Add single and double quotes to escaped characters in XML output X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=162b69828aa374f0bec24db58b05100afcb51b9a;p=ext%2Fsubsurface.git 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 --- 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)