mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
JSR-168 Portlet and Alfresco Dashlet config for MySpaces portlet. Fixes for web-script JSF runtime to encode URL args as per servlet runtime.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5826 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,6 +24,10 @@
|
||||
*/
|
||||
package org.alfresco.web.scripts.jsf;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.web.scripts.WebScriptMatch;
|
||||
import org.alfresco.web.scripts.WebScriptURLRequest;
|
||||
|
||||
@@ -50,6 +54,18 @@ public class WebScriptJSFRequest extends WebScriptURLRequest
|
||||
public WebScriptJSFRequest(String[] scriptUrlParts, WebScriptMatch match)
|
||||
{
|
||||
super(scriptUrlParts, match);
|
||||
// decode url args (as they would be if this was a servlet)
|
||||
try
|
||||
{
|
||||
for (String name : this.queryArgs.keySet())
|
||||
{
|
||||
this.queryArgs.put(name, URLDecoder.decode(this.queryArgs.get(name), "UTF-8"));
|
||||
}
|
||||
}
|
||||
catch (UnsupportedEncodingException e)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to decode UTF-8 url!", e);
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
Reference in New Issue
Block a user