pact-foundation / pact-reference

Reference implementations for the pact specifications
https://pact.io
MIT License
93 stars 46 forks source link

Strip ANSI escapes from JUnit output #426

Closed mjpieters closed 6 months ago

mjpieters commented 6 months ago

When coloured output is enabled, output strings contain ANSI escapes, sequences of binary data that communicate with a terminal to control colours. Remove these sequences when producing a JUnit report, because the ESC bytecode (0x1B) is not a valid codepoint in XML documents.

Fixes #421