https://issues.apache.org/bugzilla/show_bug.cgi?id=49404
Summary: XMLJUnitResultFormatter does not encode
entity/character references
Product: Ant
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Optional Tasks
AssignedTo: [email protected]
ReportedBy: [email protected]
The following assert:
assertTrue("&&", false);
in a JUnit test case will produce the expected text output via ant
BriefJUnitResultFormatter:
junit.framework.AssertionFailedError: &&
But an unexpected one in via ant XMLJUnitResultFormatter:
<failure message="&&" ...>junit.framework.AssertionFailedError:
&&
When an XML parser reads that output, it will assume that the assertion message
was && and not && .
It looks like there are problems in formatError method, where:
1. the attribute value is set directly instead of taking care of
entity/character references first.
2. Tag content is set directly instead of wrapping it in CDATA.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.