You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2014/10/18 17:02:12 UTC

svn commit: r1632803 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java

Author: ashish
Date: Sat Oct 18 15:02:12 2014
New Revision: 1632803

URL: http://svn.apache.org/r1632803
Log:
Applied patch from jira issue - OFBIZ-3382 - inter-app hyperlink generates incorrect url.
Thanks Pranay for the contribution and thanks Nathan for reporting the issue. 

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1632803&r1=1632802&r2=1632803&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Sat Oct 18 15:02:12 2014
@@ -70,6 +70,10 @@ public class WidgetWorker {
     public static void buildHyperlinkUrl(Appendable externalWriter, String target, String targetType, Map<String, String> parameterMap,
             String prefix, boolean fullPath, boolean secure, boolean encode, HttpServletRequest request, HttpServletResponse response, Map<String, Object> context) throws IOException {
         String localRequestName = UtilHttp.encodeAmpersands(target);
+        // We may get an encoded request like: &#47;projectmgr&#47;control&#47;EditTaskContents&#63;workEffortId&#61;10003
+        // Try to reducing a possibly encoded string down to its simplest form: /projectmgr/control/EditTaskContents?workEffortId=10003
+        // This step make sure the following appending externalLoginKey operation to work correctly
+        localRequestName = StringUtil.defaultWebEncoder.canonicalize(localRequestName);
         Appendable localWriter = new StringWriter();
 
         if ("intra-app".equals(targetType)) {