ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49404] New: XMLJUnitResultFormatter does not encode entity/character references
Date Tue, 08 Jun 2010 13:28:24 GMT
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: notifications@ant.apache.org
        ReportedBy: tztevnbfevnmz@mailinator.com


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="&amp;&amp;" ...>junit.framework.AssertionFailedError:
&amp;&amp;

When an XML parser reads that output, it will assume that the assertion message
was && and not &amp;& .

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.

Mime
View raw message