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] XMLJUnitResultFormatter does not encode entity/character references
Date Thu, 10 Jun 2010 20:14:23 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49404

Jesse Glick <jglick@netbeans.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jglick@netbeans.org
          Component|Optional Tasks              |Core
           Severity|normal                      |major

--- Comment #4 from Jesse Glick <jglick@netbeans.org> 2010-06-10 16:14:21 EDT ---
Not limited to this task.

<project default="run">
    <target name="run">
        <echoxml><x><![CDATA[&amp;&]]></x></echoxml>
    </target>
</project>

should print

<x>&amp;amp;&amp;</x>

but instead prints

<x>&amp;&amp;</x>

I would recommend isReference() be deprecated and perhaps deleted, and encode()
to unconditionally replace & with &amp;.

FWIW, the faulty code was introduced long ago:

------------------------------------------------------------------------
r268330 | bodewig | 2000-12-07 09:52:03 -0500 (Thu, 07 Dec 2000) | 7 lines

Moved the common code from XmlLogger and XMLJUnitResultLogger into a
new class.

Wrap nested text into <![CDATA[ ]]> and replace special characters in
attribute values correctly.
PR: 413

------------------------------------------------------------------------

(Bug #413 does not appear related, so I guess this was some earlier tracking
system?)

-- 
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