mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Sanitising of all java.net.URLEncoder class usage to use a proper UTF-8 URL encoder.
Since URLEncoder is actually an HTML form encoder - not really for URI encoding - and it requires an extra step (converting '+' to %20) Replaced with w3 Consortium algorithm for fast UTF-8 URL encoding in a single step (rather than using the cludgy and slow URI core java classes) Addition of Template API for generate URLs to node content download webscript API: node.serviceUrl git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7316 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
package org.alfresco.web.ui.common.component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
import javax.faces.component.UIOutput;
|
||||
import javax.faces.component.ValueHolder;
|
||||
@@ -34,6 +33,8 @@ import javax.faces.context.ResponseWriter;
|
||||
import javax.faces.convert.Converter;
|
||||
import javax.faces.el.ValueBinding;
|
||||
|
||||
import org.alfresco.util.URLEncoder;
|
||||
|
||||
/**
|
||||
* Component that simply renders text
|
||||
*
|
||||
@@ -139,7 +140,7 @@ public class UIOutputText extends UIOutput
|
||||
|
||||
if (isEncodeForJavaScript())
|
||||
{
|
||||
out.write( URLEncoder.encode((String)getValue(), "UTF-8").replace('+', ' ') );
|
||||
out.write( URLEncoder.encode((String)getValue()) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user