mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2025-08-20 00:44:35 +08:00
Pre Merge pull request !67 from liuyuxiang/N/A
This commit is contained in:
commit
1365b8d2e3
@ -14,6 +14,7 @@ import javax.servlet.http.HttpSession;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@ -270,6 +271,13 @@ public class WebUtils {
|
||||
*/
|
||||
public static String decodeUrl(String source) {
|
||||
String url = decodeBase64String(source, StandardCharsets.UTF_8);
|
||||
|
||||
try {
|
||||
url = URLDecoder.decode(url, StandardCharsets.UTF_8.name());
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
if (! StringUtils.isNotBlank(url)){
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user