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="&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h2&amp;gt; This Failed 
&amp;lt;/h2&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;">
junit.framework.AssertionFailedError: &amp;html&amp;&amp;body&amp;&amp;h2&amp; 
This Failed &amp;/h2&amp;&amp;/body&amp;&amp;/html&amp;
        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 &amp; 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

        

Reply via email to