Commit 5ed3dd6560cb148981249fbae82a8da68bb8ef0d

Authored by Fernando Ribeiro
1 parent 069797c92d

DS-3050 XOAI wrong URL encoding

dspace-oai/src/main/java/org/dspace/xoai/util/URLUtils.java
... ... @@ -10,11 +10,14 @@ package org.dspace.xoai.util;
10 10 import org.apache.log4j.LogManager;
11 11 import org.apache.log4j.Logger;
12 12  
  13 +import org.dspace.app.util.Util;
  14 +import org.dspace.core.Constants;
  15 +
13 16 import java.io.UnsupportedEncodingException;
14 17 import java.net.URLEncoder;
15 18  
16 19 /**
17   - *
  20 + *
18 21 * @author Lyncode Development Team <dspace@lyncode.com>
19 22 */
20 23 public class URLUtils
... ... @@ -24,7 +27,7 @@ public class URLUtils
24 27 public static String encode (String value) {
25 28 try
26 29 {
27   - return URLEncoder.encode(value, "UTF-8");
  30 + return Util.encodeBitstreamName(value, Constants.DEFAULT_ENCODING);
28 31 }
29 32 catch (UnsupportedEncodingException e)
30 33 {
... ...