mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2025-11-24 08:33:10 +08:00
修正预览的url中包含&时会转义为& 导致 document.getElementById("${currentUrl}").click 获取不到id
Signed-off-by: ASelince丶C <18331529783@163.com>
This commit is contained in:
@@ -102,7 +102,9 @@ public class KkFileUtils {
|
|||||||
public static String htmlEscape(String input) {
|
public static String htmlEscape(String input) {
|
||||||
if(StringUtils.hasText(input)){
|
if(StringUtils.hasText(input)){
|
||||||
//input = input.replaceAll("\\{", "%7B").replaceAll("}", "%7D").replaceAll("\\\\", "%5C");
|
//input = input.replaceAll("\\{", "%7B").replaceAll("}", "%7D").replaceAll("\\\\", "%5C");
|
||||||
return HtmlUtils.htmlEscape(input, "UTF-8");
|
String htmlStr = HtmlUtils.htmlEscape(input, "UTF-8");
|
||||||
|
//& -> &
|
||||||
|
return htmlStr.replace("&", "&");
|
||||||
}
|
}
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user