Author: lektran
Date: Mon Mar 8 16:05:09 2010
New Revision: 920369
URL:
http://svn.apache.org/viewvc?rev=920369&view=revLog:
Menu widget links of type hidden-form were not correctly encoding the value attribute.
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java?rev=920369&r1=920368&r2=920369&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java Mon Mar 8 16:05:09 2010
@@ -412,11 +412,16 @@
writer.append(uniqueItemName);
writer.append("\">");
+ StringUtil.SimpleEncoder simpleEncoder = (StringUtil.SimpleEncoder) context.get("simpleEncoder");
for (WidgetWorker.Parameter parameter: link.getParameterList()) {
writer.append("<input name=\"");
writer.append(parameter.getName());
writer.append("\" value=\"");
- writer.append(parameter.getValue(context));
+ if (simpleEncoder != null) {
+ writer.append(simpleEncoder.encode(parameter.getValue(context)));
+ } else {
+ writer.append(parameter.getValue(context));
+ }
writer.append("\" type=\"hidden\"/>");
}