Author: maartenc
Date: Mon Oct 20 15:54:23 2008
New Revision: 706442

URL: http://svn.apache.org/viewvc?rev=706442&view=rev
Log:
FIX: Maven pom license url can contain xml entities (IVY-950)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=706442&r1=706441&r2=706442&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Mon Oct 20 15:54:23 2008
@@ -110,6 +110,7 @@
 - FIX: Extra Attributes specified in the Dependency's Module Descriptor are 
not available to resolvers (IVY-929) (thanks to Scott Hebert)
 - FIX: Support for passing arbitrary arguments to the -main invoked class when 
using the standalone mode is severely limited (IVY-952) (thanks to Patrick 
Woodworth)
 - FIX: Correctly set ivy.resolved.configurations property when the conf string 
includes a negation operator (IVY-951) (thanks to Patrick Woodworth)
+- FIX: Maven pom license url can contain xml entities (IVY-950)
 
    2.0.0-rc1
 =====================================

Modified: 
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java?rev=706442&r1=706441&r2=706442&view=diff
==============================================================================
--- 
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java
 (original)
+++ 
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java
 Mon Oct 20 15:54:23 2008
@@ -447,21 +447,21 @@
                 License license = licenses[i];
                 out.print("\t\t<license ");
                 if (license.getName() != null) {
-                    out.print("name=\"" + license.getName() + "\" ");
+                    out.print("name=\"" + XMLHelper.escape(license.getName()) 
+ "\" ");
                 }
                 if (license.getUrl() != null) {
-                    out.print("url=\"" + license.getUrl() + "\" ");
+                    out.print("url=\"" + XMLHelper.escape(license.getUrl()) + 
"\" ");
                 }
                 out.println("/>");
             }
             if (md.getHomePage() != null || md.getDescription() != null) {
                 out.print("\t\t<description");
                 if (md.getHomePage() != null) {
-                    out.print(" homepage=\"" + md.getHomePage() + "\"");
+                    out.print(" homepage=\"" + 
XMLHelper.escape(md.getHomePage()) + "\"");
                 }
                 if (md.getDescription() != null && 
md.getDescription().trim().length() > 0) {
                     out.println(">");
-                    out.println("\t\t" + md.getDescription());
+                    out.println("\t\t" + 
XMLHelper.escape(md.getDescription()));
                     out.println("\t\t</description>");
                 } else {
                     out.println(" />");


Reply via email to