Don't add ]] to the CDATA node (Issue #216)

parent f2b282e4
......@@ -2,7 +2,9 @@
- No longer build documentation sets on macOS since Xcode no longer supports
them (Issue #198)
- Updated ZIP container library used for mxmldoc.
- The `mxmlNewCDATA` and `mxmlSetCDATA` functions incorrectly added the XML
trailer "]]" to the string (Issue #216)
- Updated the ZIP container library used for mxmldoc.
# Changes in Mini-XML 2.11
......
/*
* Node support code for Mini-XML, a small XML file parsing library.
*
* Copyright 2003-2017 by Michael R Sweet.
* Copyright 2003-2018 by Michael R Sweet.
*
* These coded instructions, statements, and computer programs are the
* property of Michael R Sweet and are protected by Federal copyright
......@@ -306,7 +306,7 @@ mxmlNewCDATA(mxml_node_t *parent, /* I - Parent node or @code MXML_NO_PARENT@ */
*/
if ((node = mxml_new(parent, MXML_ELEMENT)) != NULL)
node->value.element.name = _mxml_strdupf("![CDATA[%s]]", data);
node->value.element.name = _mxml_strdupf("![CDATA[%s", data);
return (node);
}
......
/*
* Node set functions for Mini-XML, a small XML file parsing library.
*
* Copyright 2003-2017 by Michael R Sweet.
* Copyright 2003-2018 by Michael R Sweet.
*
* These coded instructions, statements, and computer programs are the
* property of Michael R Sweet and are protected by Federal copyright
......@@ -53,7 +53,7 @@ mxmlSetCDATA(mxml_node_t *node, /* I - Node to set */
if (node->value.element.name)
free(node->value.element.name);
node->value.element.name = _mxml_strdupf("![CDATA[%s]]", data);
node->value.element.name = _mxml_strdupf("![CDATA[%s", data);
return (0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment