Skip to content

exml:unescape_cdata sometimes does not unescape cdata #22

@kzemek

Description

@kzemek

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;">>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions