you may want to use what is described in: http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#separatorChar
On Sun, 2009-02-15 at 10:53 +0000, [email protected] wrote: > Author: jleroux > Date: Sun Feb 15 10:53:16 2009 > New Revision: 744652 > > URL: http://svn.apache.org/viewvc?rev=744652&view=rev > Log: > This allows to use Windows paths from input fields (like from Entity import > for instance) > > Modified: > ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java > > Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java?rev=744652&r1=744651&r2=744652&view=diff > ============================================================================== > --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java > (original) > +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java Sun Feb > 15 10:53:16 2009 > @@ -245,6 +245,9 @@ > > public static String canonicalizeParameter(String paramValue) { > try { > + if (paramValue.contains(":\\")) { > + paramValue = paramValue.replace("\\", "/"); > + } > String cannedStr = > StringUtil.defaultWebEncoder.canonicalize(paramValue, > StringUtil.esapiCanonicalizeStrict); > if (Debug.verboseOn()) Debug.logVerbose("Canonicalized parameter > with " + (cannedStr.equals(paramValue) ? "no " : "") + "change: original [" + > paramValue + "] canned [" + cannedStr + "]", module); > return cannedStr; > > -- Antwebsystems.com: Quality OFBiz services for competitive prices
