svn commit: r421453 - /incubator/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java

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

svn commit: r421453 - /incubator/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java

sichen
Author: sichen
Date: Wed Jul 12 16:02:52 2006
New Revision: 421453

URL: http://svn.apache.org/viewvc?rev=421453&view=rev
Log:
XML escape the DataFile String input, otherwise the entity-engine-xml output will have " characters that are not XML escaped ("), breaking the system

Modified:
    incubator/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java

Modified: incubator/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java?rev=421453&r1=421452&r2=421453&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java (original)
+++ incubator/ofbiz/trunk/framework/datafile/src/org/ofbiz/datafile/Record.java Wed Jul 12 16:02:52 2006
@@ -36,6 +36,8 @@
 import java.util.StringTokenizer;
 import java.util.NoSuchElementException;
 
+import org.ofbiz.base.util.UtilFormatOut;
+
 /**
  * Record
  *
@@ -261,7 +263,7 @@
             set(name, new Double(number));
         } // standard types
         else if (fieldType.equals("java.lang.String") || fieldType.equals("String"))
-            set(name, value);
+            set(name, UtilFormatOut.encodeXmlValue(value));
         else if (fieldType.equals("NullTerminatedString")) {
             int terminate = value.indexOf(0x0);
             set(name, terminate>0?value.substring(0,terminate):value);