summaryrefslogtreecommitdiffstats
path: root/src/xplist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xplist.c')
-rw-r--r--src/xplist.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xplist.c b/src/xplist.c
index 15c9497..ce8dec1 100644
--- a/src/xplist.c
+++ b/src/xplist.c
@@ -196,7 +196,12 @@ static void node_to_xml(GNode * node, gpointer xml_struct)
{
xmlNodeAddContent(xstruct->xml, BAD_CAST("\t"));
}
- child_node = xmlNewChild(xstruct->xml, NULL, tag, BAD_CAST(val));
+ if (node_data->type == PLIST_STRING) {
+ /* make sure we convert the following predefined xml entities */
+ /* < = &lt; > = &gt; ' = &apos; " = &quot; & = &amp; */
+ child_node = xmlNewTextChild(xstruct->xml, NULL, tag, BAD_CAST(val));
+ } else
+ child_node = xmlNewChild(xstruct->xml, NULL, tag, BAD_CAST(val));
xmlNodeAddContent(xstruct->xml, BAD_CAST("\n"));
g_free(val);