summaryrefslogtreecommitdiffstats
path: root/save-xml.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-08-27 09:38:23 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-08-27 09:38:23 -0700
commit162b69828aa374f0bec24db58b05100afcb51b9a (patch)
treec2ed65a53c46d847593e3cd5b4704961c255aa82 /save-xml.c
parentb693bb3fb962c54767f8430058575441df243b13 (diff)
downloadsubsurface-162b69828aa374f0bec24db58b05100afcb51b9a.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r--save-xml.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/save-xml.c b/save-xml.c
index 37d6d062e..6b08c9511 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -97,6 +97,12 @@ static void quote(FILE *f, const char *text)
case '&':
escape = "&amp;";
break;
+ case '\'':
+ escape = "&apos;";
+ break;
+ case '\"':
+ escape = "&quot;";
+ break;
}
fwrite(text, (p - text - 1), 1, f);
if (!escape)