Author: jacopoc
Date: Mon Feb 16 06:54:47 2015 New Revision: 1660032 URL: http://svn.apache.org/r1660032 Log: Applied fix from trunk for revision: 1660031 === Applied patch contributed by Gareth Carter in OFBIZ-5910: it is a fix for a bug introduced by the fix for OFBIZ-3382. The issue reported in OFBIZ-3382 and the fix committed for it need to be reviewed and possibly reworked but in the meantime this fix will solve the problem with broken links reported recently. Modified: ofbiz/branches/release14.12/ (props changed) ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Propchange: ofbiz/branches/release14.12/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Feb 16 06:54:47 2015 @@ -8,4 +8,4 @@ /ofbiz/branches/json-integration-refactoring:1634077-1635900 /ofbiz/branches/multitenant20100310:921280-927264 /ofbiz/branches/release13.07:1547657 -/ofbiz/trunk:1649393,1649742,1650240,1650583,1650642,1650678,1650882,1650887,1650938,1651593,1652361,1652706,1652725,1652731,1652739,1653248,1653456,1654175,1654273,1654509,1655046,1655668,1655979,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882 +/ofbiz/trunk:1649393,1649742,1650240,1650583,1650642,1650678,1650882,1650887,1650938,1651593,1652361,1652706,1652725,1652731,1652739,1653248,1653456,1654175,1654273,1654509,1655046,1655668,1655979,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882,1660031 Modified: ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/WidgetWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1660032&r1=1660031&r2=1660032&view=diff ============================================================================== --- ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original) +++ ofbiz/branches/release14.12/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Mon Feb 16 06:54:47 2015 @@ -35,6 +35,7 @@ import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang.StringEscapeUtils; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilCodec; import org.ofbiz.base.util.UtilDateTime; @@ -67,11 +68,12 @@ 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: /projectmgr/control/EditTaskContents?workEffortId=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 = UtilCodec.canonicalize(localRequestName); + String localRequestName = StringEscapeUtils.unescapeHtml(target); + localRequestName = UtilHttp.encodeAmpersands(localRequestName); + Appendable localWriter = new StringWriter(); if ("intra-app".equals(targetType)) { |
Free forum by Nabble | Edit this page |