html escaping problems in xml reports
-------------------------------------
Key: SUREFIRE-343
URL: http://jira.codehaus.org/browse/SUREFIRE-343
Project: Maven Surefire
Issue Type: Bug
Components: xml generation
Affects Versions: 2.0 (2.2 plugin)
Reporter: Brydie McCoy
Priority: Minor
Hi,
I'm having some problems with the escaping of html specific characters (namely
the < and >) in the surefire reports.
The following example test:
{code}
public void testShouldFail() throws Exception
{
fail("<html><body><h2> This Failed </h2></body></html>");
}
{code}
resulted in the following xml report
{code}
<testcase time="0" name="testShouldFail">
<failure type="junit.framework.AssertionFailedError"
message="&lt;html&gt;&lt;body&gt;&lt;h2&gt; This Failed
&lt;/h2&gt;&lt;/body&gt;&lt;/html&gt;">
junit.framework.AssertionFailedError: &html&&body&&h2&
This Failed &/h2&&/body&&/html&
at junit.framework.Assert.fail(Assert.java:47)
at FailingTest.testShouldFail(FailingTest.java:7)
</failure>
</testcase>
{code}
The text in the "message' attribute has been correctly escaped but the text
within the <failure> tags seems to just have & for any of the html
characters.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira