Browse Source

修正预览的url中包含&时会转义为& 导致 document.getElementById("${currentUrl}").click 获取不到id

Signed-off-by: ASelince丶C <18331529783@163.com>
pull/86/head
ASelince丶C 2 years ago committed by Gitee
parent
commit
b53ad6054e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
  1. 4
      server/src/main/java/cn/keking/utils/KkFileUtils.java

4
server/src/main/java/cn/keking/utils/KkFileUtils.java

@ -102,7 +102,9 @@ public class KkFileUtils {
public static String htmlEscape(String input) {
if(StringUtils.hasText(input)){
//input = input.replaceAll("\\{", "%7B").replaceAll("}", "%7D").replaceAll("\\\\", "%5C");
return HtmlUtils.htmlEscape(input, "UTF-8");
String htmlStr = HtmlUtils.htmlEscape(input, "UTF-8");
//& -> &amp;
return htmlStr.replace("&amp;", "&");
}
return input;
}

Loading…
Cancel
Save