Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print_escaped_cdata only escapes first cdata #350

Open
davidmatson opened this issue Aug 8, 2022 · 0 comments
Open

print_escaped_cdata only escapes first cdata #350

davidmatson opened this issue Aug 8, 2022 · 0 comments

Comments

@davidmatson
Copy link

davidmatson commented Aug 8, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant