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:04:05 UTC

svn commit: r1632804 - /ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/WidgetWorker.java

Author: ashish
Date: Sat Oct 18 15:04:05 2014
New Revision: 1632804

URL: http://svn.apache.org/r1632804
Log:
Applied bug fix from trunk r1632803.
=============================================
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/branches/release13.07/framework/widget/src/org/ofbiz/widget/WidgetWorker.java

Modified: ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1632804&r1=1632803&r2=1632804&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original)
+++ ofbiz/branches/release13.07/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Sat Oct 18 15:04:05 2014
@@ -58,6 +58,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)) {