diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-08-27 09:38:23 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-08-27 09:38:23 -0700 |
commit | 162b69828aa374f0bec24db58b05100afcb51b9a (patch) | |
tree | c2ed65a53c46d847593e3cd5b4704961c255aa82 /save-xml.c | |
parent | b693bb3fb962c54767f8430058575441df243b13 (diff) | |
download | subsurface-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.c | 6 |
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 = "&"; break; + case '\'': + escape = "'"; + break; + case '\"': + escape = """; + break; } fwrite(text, (p - text - 1), 1, f); if (!escape) |