Pārlūkot izejas kodu

!86 预览图片的url中如果包含&会导致.click报错儿
Merge pull request !86 from ASelince丶C/N/A

kailing 1 gadu atpakaļ
vecāks
revīzija
f593b0cf24

+ 3 - 1
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;
     }