Author: jleroux
Date: Fri Feb 6 09:30:09 2009
New Revision: 741491
URL:
http://svn.apache.org/viewvc?rev=741491&view=revLog:
Close
https://issues.apache.org/jira/browse/OFBIZ-2168 - OFBIZ-2168
Modified:
ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java
Modified: ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java?rev=741491&r1=741490&r2=741491&view=diff==============================================================================
--- ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java (original)
+++ ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/DataFile2EntityXml.java Fri Feb 6 09:30:09 2009
@@ -66,7 +66,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("/>");
@@ -119,8 +123,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();