Procházet zdrojové kódy

wip:提交修改仅过滤用户输入内容

wangkaiyue před 2 roky
rodič
revize
80972ba315

+ 1 - 1
api/messagecenter/internal/logic/messageaddlogic.go

@@ -44,7 +44,7 @@ func (l *MessageAddLogic) MessageAdd(req *types.MessageEntity) (*types.CommonRes
 		OwnType:   req.OwnType,
 		Title:     req.Title,
 		SendId:    quitl.Int64All(encrypt.SE.Decode4Hex(req.SendId)),
-		Content:   htmlFilter.Sanitize(fsw.Repl(req.Content)),
+		Content:   quitl.ObjToString(quitl.If(req.Type == 3 || req.Type == 4, fsw.Repl(req.Content), htmlFilter.Sanitize(fsw.Repl(req.Content)))),
 		Item:      req.Item,
 		Type:      req.Type,
 		Link:      req.Link,