Author: jleroux
Date: Thu Mar 11 07:57:27 2010
New Revision: 921714
URL:
http://svn.apache.org/viewvc?rev=921714&view=revLog:
As suggested by Adam and Scott move the encodeQuotes static method (actually renamed encodeDoubleQuotes) from UtilHttp to FreeMarkerWorker
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.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=921714&r1=921713&r2=921714&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 Thu Mar 11 07:57:27 2010
@@ -874,10 +874,6 @@ public class UtilHttp {
return htmlString.replaceAll(" ", "%20");
}
- public static String encodeQuotes(String htmlString) {
- return htmlString.replaceAll("\"", "\\\\\"");
- }
-
public static String setResponseBrowserProxyNoCache(HttpServletRequest request, HttpServletResponse response) {
setResponseBrowserProxyNoCache(response);
return "success";
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java?rev=921714&r1=921713&r2=921714&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java Thu Mar 11 07:57:27 2010
@@ -652,4 +652,8 @@ public class FreeMarkerWorker {
}
}
}
+
+ public static String encodeDoubleQuotes(String htmlString) {
+ return htmlString.replaceAll("\"", "\\\\\"");
+ }
}
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=921714&r1=921713&r2=921714&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Thu Mar 11 07:57:27 2010
@@ -2762,7 +2762,7 @@ public class MacroFormRenderer implement
StringWriter sr = new StringWriter();
sr.append("<@renderTooltip ");
sr.append("tooltip=\"");
- sr.append(UtilHttp.encodeQuotes(tooltip));
+ sr.append(FreeMarkerWorker.encodeDoubleQuotes(tooltip));
sr.append("\" tooltipStyle=\"");
sr.append(modelFormField.getTooltipStyle());
sr.append("\" />");