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

exml:unescape_cdata sometimes does not unescape cdata #22

Open
kzemek opened this issue Feb 8, 2017 · 0 comments
Open

exml:unescape_cdata sometimes does not unescape cdata #22

kzemek opened this issue Feb 8, 2017 · 0 comments

Comments

@kzemek
Copy link

kzemek commented Feb 8, 2017

Because C's exml_unescape_cdata() is being fed with arbitrary chunks of input, if an escaped character appears on the division point (in current implementation the input is divided in 20000-byte chunks) it's not recognized as an escaped character by the C code and is thus not unescaped. This can be reproduced with the following snippet:

> Input = lists:duplicate(19999, "a") ++ "&",
> binary_part(exml:unescape_cdata({xmlcdata, Input}), {19999, 5}).
<<"&amp;">>
michalwski added a commit to michalwski/exml that referenced this issue May 9, 2018
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