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

Retain CDATA wrapping of bare material on reformatting #94

Closed
aniline opened this issue Aug 16, 2024 · 0 comments
Closed

Retain CDATA wrapping of bare material on reformatting #94

aniline opened this issue Aug 16, 2024 · 0 comments

Comments

@aniline
Copy link

aniline commented Aug 16, 2024

Running xq on an XML document with <![CDATA[ ]]> wrapped data, drops the CDATA wrapping of the character data string without any escaping. This could result in an output which is not a proper XML ('well formed').

Example: Running xq --no-color < input.xml

input.xml:

<?xml version="1.0" encoding="UTF-8"?><Top><![CDATA[Ding&Dong=]]></Top>

Output:

<?xml version="1.0" encoding="UTF-8"?>
<Top>Ding&Dong=</Top>
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