Author: lektran
Date: Mon Mar 8 16:10:54 2010
New Revision: 920379
URL:
http://svn.apache.org/viewvc?rev=920379&view=revLog:
Merged from trunk r920369:
Menu widget links of type hidden-form were not correctly encoding the value attribute.
Modified:
ofbiz/branches/release09.04/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
Modified: ofbiz/branches/release09.04/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java?rev=920379&r1=920378&r2=920379&view=diff==============================================================================
--- ofbiz/branches/release09.04/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java (original)
+++ ofbiz/branches/release09.04/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java Mon Mar 8 16:10:54 2010
@@ -396,11 +396,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\"/>");
}