Author: maartenc
Date: Sun Oct 17 09:02:27 2010
New Revision: 1023438

URL: http://svn.apache.org/viewvc?rev=1023438&view=rev
Log:
FIX: Cached ivy.xml is invalid if the description contains the ampersand entity 
(&) (IVY-1237)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
    
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update-withvar.xml
    
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update.xml
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/updated.xml

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=1023438&r1=1023437&r2=1023438&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Sun Oct 17 09:02:27 2010
@@ -113,6 +113,7 @@ for detailed view of each issue, please 
        
    trunk
 =====================================
+- FIX: Cached ivy.xml is invalid if the description contains the ampersand 
entity (&) (IVY-1237)
 - FIX: Couldn't authenticate against sites having the same address as the 
proxy server (IVY-1234)
 - FIX: OutOfMemoryError when uploading large files using commons-httpclient 
(IVY-1197) (thanks to Torkild U. Resheim)
 

Modified: 
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java?rev=1023438&r1=1023437&r2=1023438&view=diff
==============================================================================
--- 
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
 (original)
+++ 
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
 Sun Oct 17 09:02:27 2010
@@ -857,7 +857,7 @@ public final class XmlModuleDescriptorUp
                 write(">");
                 justOpen = null;
             }
-            write(String.valueOf(ch, start, length));
+            write(XMLHelper.escape(String.valueOf(ch, start, length)));
             
             //examine characters for current indent level, keeping in mind
             //that our indent might be split across multiple calls to 
characters()

Modified: 
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update-withvar.xml
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update-withvar.xml?rev=1023438&r1=1023437&r2=1023438&view=diff
==============================================================================
--- 
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update-withvar.xml
 (original)
+++ 
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update-withvar.xml
 Sun Oct 17 09:02:27 2010
@@ -37,7 +37,7 @@
 
                <description homepage="${homepage}">           
        This module is <b>great</b> !<br/>
-       You can use it especially with myconf1 and myconf2, and myconf4 is not 
too bad too.
+       You can use it especially with myconf1 &amp; myconf2, and myconf4 is 
not too bad too.
                </description>
        </info>
        <configurations>

Modified: 
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update.xml
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update.xml?rev=1023438&r1=1023437&r2=1023438&view=diff
==============================================================================
--- 
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update.xml 
(original)
+++ 
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update.xml 
Sun Oct 17 09:02:27 2010
@@ -37,7 +37,7 @@
 
                <description homepage="http://www.my.org/mymodule/";>           
        This module is <b>great</b> !<br/>
-       You can use it especially with myconf1 and myconf2, and myconf4 is not 
too bad too.
+       You can use it especially with myconf1 &amp; myconf2, and myconf4 is 
not too bad too.
                </description>
        </info>
        <configurations>

Modified: 
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/updated.xml
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/updated.xml?rev=1023438&r1=1023437&r2=1023438&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/updated.xml 
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/updated.xml 
Sun Oct 17 09:02:27 2010
@@ -32,7 +32,7 @@
 
                <description homepage="http://www.my.org/mymodule/";>           
        This module is <b>great</b> !<br/>
-       You can use it especially with myconf1 and myconf2, and myconf4 is not 
too bad too.
+       You can use it especially with myconf1 &amp; myconf2, and myconf4 is 
not too bad too.
                </description>
        </info>
        <configurations>


Reply via email to