优化:url特殊字符相关处理

This commit is contained in:
陈精华
2020-05-19 09:40:35 +08:00
committed by kl
parent c0f7d60213
commit 1a4748bbec
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ public class PdfUtils {
String pdfFolder = pdfName.substring(0, pdfName.length() - 4);
String urlPrefix = null;
try {
urlPrefix = baseUrl + URLEncoder.encode(URLEncoder.encode(pdfFolder, uriEncoding), uriEncoding);
urlPrefix = baseUrl + URLEncoder.encode(URLEncoder.encode(pdfFolder, uriEncoding).replaceAll("\\+", "%20"), uriEncoding);
} catch (UnsupportedEncodingException e) {
logger.error("UnsupportedEncodingException", e);
urlPrefix = baseUrl + pdfFolder;