diff --git a/server/src/main/java/cn/keking/utils/KkFileUtils.java b/server/src/main/java/cn/keking/utils/KkFileUtils.java index aa7a8bfe..6fc6121b 100644 --- a/server/src/main/java/cn/keking/utils/KkFileUtils.java +++ b/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"); + //& -> & + return htmlStr.replace("&", "&"); } return input; }