https://bz.apache.org/bugzilla/show_bug.cgi?id=65030
--- Comment #5 from Stefan Bodewig <bode...@apache.org> --- The XMLStreamWriter API is not very useful IMHO. It is not possible to add entity references to an attribute as writeAttribute encodes the ampersand. For the old JUnit Reports we would have replaced newlines (and a few other whitespace chars) by a numeric entity reference, this is not possible here. Anyway, we could strip characters that are not legal inside of XML documents (like we do for the traditional JUnit case) or we could replace them with an entity reference (i.e. 0 with �) - which would still be illegal per se - but benefit from writeAttribute escaping the ampersand - this is what JUnit 5 itself or Surefire seem to be doing (unknowingly, maybe). I'm a bit on the fence here, either fix would be pretty easy to implement but a bit tricky to test. -- You are receiving this mail because: You are the assignee for the bug.