svn commit: r744232 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java

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

svn commit: r744232 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java

jonesde
Author: jonesde
Date: Fri Feb 13 20:35:04 2009
New Revision: 744232

URL: http://svn.apache.org/viewvc?rev=744232&view=rev
Log:
Changed LoginWorker.makeLoginUrl to return a StringWrapper so it does not get html encoded in FTL; decided to do it here instead of in each FTL file because based on a search it appears that this is ONLY used in FTL files

Modified:
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=744232&r1=744231&r2=744232&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java Fri Feb 13 20:35:04 2009
@@ -43,11 +43,13 @@
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.KeyStoreUtil;
+import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilFormatOut;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.base.util.StringUtil.StringWrapper;
 import org.ofbiz.common.login.LoginServices;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
@@ -79,25 +81,25 @@
     /** This Map is keyed by the randomly generated externalLoginKey and the value is a UserLogin GenericValue object */
     public static Map<String, GenericValue> externalLoginKeys = FastMap.newInstance();
     
-    public static String makeLoginUrl(PageContext pageContext) {
+    public static StringWrapper makeLoginUrl(PageContext pageContext) {
         return makeLoginUrl(pageContext, "checkLogin");
     }
 
-    public static String makeLoginUrl(HttpServletRequest request) {
+    public static StringWrapper makeLoginUrl(HttpServletRequest request) {
         return makeLoginUrl(request, "checkLogin");
     }
     
-    public static String makeLoginUrl(PageContext pageContext, String requestName) {
+    public static StringWrapper makeLoginUrl(PageContext pageContext, String requestName) {
         return makeLoginUrl((HttpServletRequest) pageContext.getRequest(), requestName);
     }
-    public static String makeLoginUrl(HttpServletRequest request, String requestName) {
+    public static StringWrapper makeLoginUrl(HttpServletRequest request, String requestName) {
         Map<String, Object> urlParams = UtilHttp.getUrlOnlyParameterMap(request);
         String queryString = UtilHttp.urlEncodeArgs(urlParams, false);
         String currentView = UtilFormatOut.checkNull((String) request.getAttribute("_CURRENT_VIEW_"));
 
         String loginUrl = "/" + requestName;
         if ("login".equals(currentView)) {
-            return loginUrl;
+            return StringUtil.wrapString(loginUrl);
         }
         if (UtilValidate.isNotEmpty(currentView)) {
             loginUrl += "/" + currentView;
@@ -106,7 +108,7 @@
             loginUrl += "?" + queryString;
         }
 
-        return loginUrl;
+        return StringUtil.wrapString(loginUrl);
     }
     
     /**