Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0 (2.2 plugin)
-
None
Description
Hi,
I'm having some problems with the escaping of html specific characters (namely the < and >) in the surefire reports.
The following example test:
public void testShouldFail() throws Exception { fail("<html><body><h2> This Failed </h2></body></html>"); }
resulted in the following xml report
<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>
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.