print_escaped_cdata only escapes first cdata
davidmatson opened this issue · 0 comments
davidmatson commented
This works:
BOOST_AUTO_TEST_CASE(one_embedded_cdata_section)
{
BOOST_REQUIRE_MESSAGE(false, "<![CDATA[EmbeddedCDATA]]>AdditionalTextAfterwards");
}
This produces invalid XML data using -o XML:
BOOST_AUTO_TEST_CASE(two_embedded_cdata_sections)
{
BOOST_REQUIRE_MESSAGE(false, "<![CDATA[EmbeddedCDATA1]]><![CDATA[EmbeddedCDATA2]]>AdditionalTextAfterwards");
}
I believe the if test here:
if( pos == const_string::npos )
needs to be a loop instead.