|
@@ -24,6 +24,7 @@ import com.yohobuy.platform.model.common.PageResponseVO; |
|
@@ -24,6 +24,7 @@ import com.yohobuy.platform.model.common.PageResponseVO; |
24
|
import com.yohobuy.platform.model.grass.request.GrassArticleReq;
|
24
|
import com.yohobuy.platform.model.grass.request.GrassArticleReq;
|
25
|
import com.yohobuy.platform.model.grass.response.ArticleDetailRspBo;
|
25
|
import com.yohobuy.platform.model.grass.response.ArticleDetailRspBo;
|
26
|
import org.apache.commons.collections.CollectionUtils;
|
26
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
27
|
+import org.apache.commons.lang3.StringEscapeUtils;
|
27
|
import org.apache.commons.lang3.StringUtils;
|
28
|
import org.apache.commons.lang3.StringUtils;
|
28
|
import org.slf4j.Logger;
|
29
|
import org.slf4j.Logger;
|
29
|
import org.slf4j.LoggerFactory;
|
30
|
import org.slf4j.LoggerFactory;
|
|
@@ -484,10 +485,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ |
|
@@ -484,10 +485,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ |
484
|
// rspBo.setTopicName(getArticleName(article.getTopicId()));
|
485
|
// rspBo.setTopicName(getArticleName(article.getTopicId()));
|
485
|
if(article.getAuthorType() ==2){
|
486
|
if(article.getAuthorType() ==2){
|
486
|
Author author = authorInfoMap.get(article.getAuthorUid());
|
487
|
Author author = authorInfoMap.get(article.getAuthorUid());
|
487
|
- rspBo.setNickName(author == null ? "" : author.getUsername());
|
488
|
+ rspBo.setNickName(StringEscapeUtils.escapeHtml4(author == null ? "" : author.getUsername()));
|
488
|
}else {
|
489
|
}else {
|
489
|
UserInfoRspBO userinfo = userInfoMap.get(article.getAuthorUid());
|
490
|
UserInfoRspBO userinfo = userInfoMap.get(article.getAuthorUid());
|
490
|
- rspBo.setNickName(userinfo == null ? "" : userinfo.getNickName());
|
491
|
+ rspBo.setNickName(StringEscapeUtils.escapeHtml4(userinfo == null ? "" : userinfo.getNickName()));
|
491
|
}
|
492
|
}
|
492
|
rspBo.setCommentCount(Optional.ofNullable(commentCount.get(article.getId())).orElse(0));
|
493
|
rspBo.setCommentCount(Optional.ofNullable(commentCount.get(article.getId())).orElse(0));
|
493
|
rspBo.setFavorCount(article.getFavoriteCount());
|
494
|
rspBo.setFavorCount(article.getFavoriteCount());
|