[OFBiz] SVN: r7099 - trunk/base/src/base/org/ofbiz/base/util
jonesde@svn.ofbiz.org
jonesde at svn.ofbiz.org
Tue Mar 28 17:02:57 CST 2006
Author: jonesde
Date: 2006-03-28 17:02:54 -0600 (Tue, 28 Mar 2006)
New Revision: 7099
Modified:
trunk/base/src/base/org/ofbiz/base/util/UtilFormatOut.java
trunk/base/src/base/org/ofbiz/base/util/UtilHttp.java
Log:
Rest of the patch from Jacopo
Modified: trunk/base/src/base/org/ofbiz/base/util/UtilFormatOut.java
===================================================================
--- trunk/base/src/base/org/ofbiz/base/util/UtilFormatOut.java 2006-03-28 22:06:02 UTC (rev 7098)
+++ trunk/base/src/base/org/ofbiz/base/util/UtilFormatOut.java 2006-03-28 23:02:54 UTC (rev 7099)
@@ -131,7 +131,8 @@
* @param locale The Locale used to format the number
* @return A String with the formatted amount
*/
- public static String formatAmount(double amount, Locale locale) { // dovrebbe sostituire formatPrice
+ // This method should be used in place of formatPrice because it is locale aware.
+ public static String formatAmount(double amount, Locale locale) {
com.ibm.icu.text.NumberFormat nf = com.ibm.icu.text.NumberFormat.getInstance(locale);
nf.setMinimumFractionDigits(2);
nf.setMaximumFractionDigits(2);
Modified: trunk/base/src/base/org/ofbiz/base/util/UtilHttp.java
===================================================================
--- trunk/base/src/base/org/ofbiz/base/util/UtilHttp.java 2006-03-28 22:06:02 UTC (rev 7098)
+++ trunk/base/src/base/org/ofbiz/base/util/UtilHttp.java 2006-03-28 23:02:54 UTC (rev 7099)
@@ -514,6 +514,10 @@
return htmlBuffer.toString();
}
+ public static String encodeBlanks(String htmlString) {
+ return htmlString.replaceAll(" ", "%20");
+ }
+
public static String setResponseBrowserProxyNoCache(HttpServletRequest request, HttpServletResponse response) {
setResponseBrowserProxyNoCache(response);
return "success";
More information about the Svn
mailing list