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

This commit is contained in:
Michael R Sweet 2018-07-02 18:23:04 -04:00
parent f2b282e49c
commit e0db328ec8
No known key found for this signature in database
GPG Key ID: 999559A027815955
3 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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);
}