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
fix: remove ansi escape sequences from escaped xunit output #4527
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there a way to escape or remove all invalid characters for XML?
There is a related |
This PR hasn't had any recent activity, and I'm labeling it |
This issue has been hanging around for 8 months now, and I'm unsure what I can do to get it moving again. There is an open thread that has multiple possible solutions to the problem, but no expression of preference from the Mocha team. |
Hi @JoshuaKGoldberg – that's unexpected – but not unwelcome. I'm happy to rebase the PR to the latest |
Great! Let's go ahead and reopen this one. We also discussed that we don't like the requirement of rebasing, so if you want to do a more casual merge that works too. Whatever's easiest on your end. 🙂 |
Ok, let me get that CLA signed, then. |
|
Requirements
Description of the Change
The
utils.escape
function is amended to strip the escape sequence using a regular expression.Alternate Designs
he
library: dismissed because the direct fix is likely faster to become usablehe
: dismissed because the correct escaping in JavaScript is harder to findWhy should this be in core?
The
xunit
reporter is in core and should not be buggyBenefits
xunit
reporter output can be consumed by tools that expect valid XMLPossible Drawbacks
Tools that process the XML as plain (unicode) text (unlikely) can no longer see the ANSI escape sequence.
Applicable issues
fixes #4526
This is a bug fix (patch release)