svn commit: r741503 - in /ofbiz/branches/release4.0: ./ framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r741503 - in /ofbiz/branches/release4.0: ./ framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java

jleroux@apache.org
Author: jleroux
Date: Fri Feb  6 10:20:03 2009
New Revision: 741503

URL: http://svn.apache.org/viewvc?rev=741503&view=rev
Log:
Applied fix from trunk for revision: 741491

Modified:
    ofbiz/branches/release4.0/   (props changed)
    ofbiz/branches/release4.0/framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java

Propchange: ofbiz/branches/release4.0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb  6 10:20:03 2009
@@ -1 +1 @@
-/ofbiz/trunk:539836-539837,618970,627900,629279,674173,676162,676227,676246,679704,690644,705862,706035,706055,706067,706692,721839,721887,728935,737443
+/ofbiz/trunk:539836-539837,618970,627900,629279,674173,676162,676227,676246,679704,690644,705862,706035,706055,706067,706692,721839,721887,728935,737443,738870,741491

Modified: ofbiz/branches/release4.0/framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java?rev=741503&r1=741502&r2=741503&view=diff
==============================================================================
--- ofbiz/branches/release4.0/framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java (original)
+++ ofbiz/branches/release4.0/framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java Fri Feb  6 10:20:03 2009
@@ -69,7 +69,11 @@
                         }
                     }
                     if (value != null) {
-                        outFile.write(modelField.name + "=\"" + value + "\" ");
+                        if (value instanceof String) {
+                            outFile.write(modelField.name + "=\"" + UtilFormatOut.encodeXmlValue((String)value) + "\" ");
+                        } else {
+                            outFile.write(modelField.name + "=\"" + value + "\" ");
+                        }
                     }
                 }
                 outFile.write("/>");
@@ -125,8 +129,10 @@
                 Object value = record.get(modelField.name);
                 if (value instanceof String) {
                     value = ((String)value).trim();
+                    outFile.write(modelField.name + "=\"" + UtilFormatOut.encodeXmlValue((String)value) + "\" ");
+                } else {
+                    outFile.write(modelField.name + "=\"" + value + "\" ");
                 }
-                outFile.write(modelField.name + "=\"" + value + "\" ");
             }
             outFile.write("/>");
             outFile.newLine();