diff --git a/lib/src/clixon_string.c b/lib/src/clixon_string.c index 9a741265..2bce6d62 100644 --- a/lib/src/clixon_string.c +++ b/lib/src/clixon_string.c @@ -530,6 +530,7 @@ xml_chardata_encode(char **escp, len += strlen("&"); break; case '<': + // ", strlen("]]>")) == 0)){ + cdata = 0; + i += 2; + } else { + dec[j++] = str[i]; + } + } else { ch = str[i]; switch (ch){ case '&': - if ((ret = xml_chardata_decode_ampersand(&str[i+1], &ch, &i)) < 0) - goto done; - if (ret == 0) - dec[j++] = str[i]; - else - dec[j++] = ch; - break; + if ((ret = xml_chardata_decode_ampersand(&str[i+1], &ch, &i)) < 0) + goto done; + if (ret == 0) + dec[j++] = str[i]; + else + dec[j++] = ch; + break; + case '<': + if (strncmp(&str[i], "