svn commit: r920379 - /ofbiz/branches/release09.04/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r920379 - /ofbiz/branches/release09.04/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java

lektran
Author: lektran
Date: Mon Mar  8 16:10:54 2010
New Revision: 920379

URL: http://svn.apache.org/viewvc?rev=920379&view=rev
Log:
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\"/>");
                 }