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

]]> in CDATA is not escaped #173

Closed
Turbo87 opened this issue Nov 17, 2024 · 1 comment · Fixed by #174
Closed

]]> in CDATA is not escaped #173

Turbo87 opened this issue Nov 17, 2024 · 1 comment · Fixed by #174

Comments

@Turbo87
Copy link
Contributor

Turbo87 commented Nov 17, 2024

In #167 it was clarified that no manual escaping of fields should be needed and that the description will be wrapped in a CDATA section for escaping purposes.

According to https://en.wikipedia.org/wiki/CDATA#Nesting ]]> in a CDATA section needs to be encoded as ]]]]><![CDATA[> to not accidentally close the CDATA section.

When I'm putting my test string ("let's try & break this <item> ]]>, shall we?") into the description field however, I currently see this in the output:

<description><![CDATA[let's try & break this <item> ]]>, shall we?]]></description>
@Turbo87
Copy link
Contributor Author

Turbo87 commented Nov 17, 2024

I've now also reported this at tafia/quick-xml#831 to clarify who is supposed to take care of the escaping in this case.

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

Successfully merging a pull request may close this issue.

1 participant