mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-17 22:53:49 +08:00
优化:url特殊字符相关处理
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user