xiexiaoyuan 2 жил өмнө
parent
commit
a64ad6bc53
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      services/day_new.go

+ 2 - 2
services/day_new.go

@@ -10,6 +10,7 @@ import (
 	"hongze/hongze_open_api/services/alarm_msg"
 	"hongze/hongze_open_api/services/wework"
 	"hongze/hongze_open_api/utils"
+	"html"
 	"strconv"
 	"strings"
 	"time"
@@ -442,8 +443,7 @@ func batchTranslateHandlerByGoogle(contentMap map[string]string) (contentEnMap m
 		return
 	}
 	for k, v := range contentEnMap {
-		v = strings.ReplaceAll(v,`"`, "\"")
-		v = strings.ReplaceAll(v,`'`, "'")
+		v = html.UnescapeString(v)
 		contentEnMap[k] = v
 	}
 	return