diff --git a/CHANGES.md b/CHANGES.md index 4a9294f..bd0995c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/mxml-node.c b/mxml-node.c index d2468d2..1cbed06 100644 --- a/mxml-node.c +++ b/mxml-node.c @@ -1,7 +1,7 @@ /* * 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); } diff --git a/mxml-set.c b/mxml-set.c index 71ade49..7f5bd3d 100644 --- a/mxml-set.c +++ b/mxml-set.c @@ -1,7 +1,7 @@ /* * 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); }