Skip to content

Conversation

@frobian21
Copy link
Contributor

#16388 introduced a bug where invalid xml could be produced by write_junit_xml, as special characters were no longer being escaped.

The fix is to revert the removal of from xml.sax.saxutils import escape and escape("\n".join(messages)) in the write_junit_xml function.

I've added a small test case which checks that the <, >, & are escaped correctly in the xml.

@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JelleZijlstra JelleZijlstra merged commit 4aba5ca into python:master Jan 2, 2024
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 this pull request may close these issues.

2 participants