-
-
Notifications
You must be signed in to change notification settings - Fork 739
JUnit File Parse Error #9674
Copy link
Copy link
Closed
Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | 2.3.8 |
Issue with JUnit output when diff includes ampersand due to ampersand not being escaped.
Minimal PHP Code Causing Issue
Any code that produces diff that results in ampersand being included in diff.
$foo = isset($bar) ? $bar : ($baz && $qux);
// TernaryToNullCoalesceingRectorRun Rector with output junit
Run xml validation tool
Xml validation tool should fail pointing to error parsing EntityName due to unescaped ampersand
Expected Behaviour
DOMDocument::createElement() is being used with a raw text value, but docs state only < and > are escaped when using that method. So rector needs to escape those characters prior to calling createElement() or use DOMDocument::createTextNode() to create the text node.
Reactions are currently unavailable