Browse Source

!86 预览图片的url中如果包含&会导致.click报错儿

Merge pull request !86 from ASelince丶C/N/A
pull/116/MERGE
kailing 2 years ago committed by Gitee
parent
commit
f593b0cf24
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

@ -104,7 +104,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");
//& -> &
return htmlStr.replace("&", "&");
}
return input;
}

Loading…
Cancel
Save