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

Invalid characters crawl into XML report making it invalid #47

Open
mlopatkin opened this issue Oct 24, 2019 · 0 comments
Open

Invalid characters crawl into XML report making it invalid #47

mlopatkin opened this issue Oct 24, 2019 · 0 comments

Comments

@mlopatkin
Copy link

Stacktraces from Kotlin Coroutines sometimes have '\b' (ASCII backspace, 0x08) character in them, e.g. a line like at \b\b\b(Coroutine boundary.\b(\b). Thanks to KXML's relaxed validation when serializing, this ends up in XML data as at (Coroutine boundary.(). However this isn't valid XML 1.0, see https://www.w3.org/TR/xml/#char32 (it is valid 1.1 but file header says 1.0) and breaks lots of existing parsers.

As there is no way of preventing such characters from appearing in the stacktraces, some kind of escaping should be done prior to writing them to XML, probably like it is already done for \0 in XmlTestRunListener.sanitize.

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