📝 更新README

pull/33/merge
ruibaby 2018-08-19 15:09:12 +08:00
parent 0516874029
commit 64a5eb792e
6 changed files with 8 additions and 10 deletions

View File

@ -77,6 +77,7 @@ Let's start: http://localhost:8090
- [Vno](https://github.com/ruibaby/vno-halo) - 来自Jekyll的一款主题作者[Wei Wang](https://onevcat.com/)。
- [Hux](https://github.com/ruibaby/hux-halo) - 来自Jekyll的一款主题作者[Xuan Huang](https://huangxuan.me/)。
- [Story](https://github.com/ruibaby/story-halo) - 来自Typecho的一款主题作者[Trii Hsia](https://yumoe.com/)。
- [NexT](https://github.com/ruibaby/next-halo) - 来自Hexo的一款主题作者[iissnan](https://notes.iissnan.com/)。
> 声明:不接受任何对**移植主题**功能上的意见和建议。

View File

@ -37,7 +37,7 @@
<ehcache.version>3.5.2</ehcache.version>
<rome.version>1.0</rome.version>
<commons-lang3.version>3.7</commons-lang3.version>
<hutool-all.version>4.1.1</hutool-all.version>
<hutool-all.version>4.1.7</hutool-all.version>
<upyun-java-sdk.version>4.0.1</upyun-java-sdk.version>
<qiniu-java-sdk.version>7.2.14</qiniu-java-sdk.version>
<thumbnailator.version>0.4.8</thumbnailator.version>

View File

@ -167,7 +167,7 @@ public class AdminController extends BaseController {
logsService.saveByLogs(
new Logs(
LogsRecord.LOGIN,
LogsRecord.LOGIN_ERROR + "[" + HtmlUtil.encode(loginName) + "," + HtmlUtil.encode(loginPwd) + "]",
LogsRecord.LOGIN_ERROR + "[" + HtmlUtil.escape(loginName) + "," + HtmlUtil.escape(loginPwd) + "]",
ServletUtil.getClientIP(request),
DateUtil.date()
)

View File

@ -183,7 +183,7 @@ public class CommentController extends BaseController {
comment.setCommentAuthorAvatarMd5(SecureUtil.md5(user.getUserEmail()));
comment.setCommentDate(DateUtil.date());
String lastContent = "<a href='#comment-id-" + lastComment.getCommentId() + "'>@" + lastComment.getCommentAuthor() + "</a> ";
comment.setCommentContent(lastContent + OwoUtil.markToImg(HtmlUtil.encode(commentContent)));
comment.setCommentContent(lastContent + OwoUtil.markToImg(HtmlUtil.escape(commentContent)));
comment.setCommentAgent(userAgent);
comment.setCommentParent(commentId);
comment.setCommentStatus(CommentStatusEnum.PUBLISHED.getCode());

View File

@ -114,19 +114,19 @@ public class FrontCommentController {
try {
Comment lastComment = null;
post = postService.findByPostId(post.getPostId()).get();
comment.setCommentAuthorEmail(HtmlUtil.encode(comment.getCommentAuthorEmail()).toLowerCase());
comment.setCommentAuthorEmail(HtmlUtil.escape(comment.getCommentAuthorEmail()).toLowerCase());
comment.setPost(post);
comment.setCommentDate(DateUtil.date());
comment.setCommentAuthorIp(ServletUtil.getClientIP(request));
comment.setIsAdmin(0);
comment.setCommentAuthor(HtmlUtil.encode(comment.getCommentAuthor()));
comment.setCommentAuthor(HtmlUtil.escape(comment.getCommentAuthor()));
if (comment.getCommentParent() > 0) {
lastComment = commentService.findCommentById(comment.getCommentParent()).get();
String lastContent = "<a href='#comment-id-" + lastComment.getCommentId() + "'>@" + lastComment.getCommentAuthor() + "</a>";
comment.setCommentContent(lastContent + StringUtils.substringAfter(OwoUtil.markToImg(HtmlUtil.encode(comment.getCommentContent())), ":"));
comment.setCommentContent(lastContent + StringUtils.substringAfter(OwoUtil.markToImg(HtmlUtil.escape(comment.getCommentContent())), ":"));
} else {
//将评论内容的字符专为安全字符
comment.setCommentContent(OwoUtil.markToImg(HtmlUtil.encode(comment.getCommentContent())));
comment.setCommentContent(OwoUtil.markToImg(HtmlUtil.escape(comment.getCommentContent())));
}
if (StringUtils.isNotEmpty(comment.getCommentAuthorUrl())) {
comment.setCommentAuthorUrl(URLUtil.formatUrl(comment.getCommentAuthorUrl()));

View File

@ -2,9 +2,6 @@
<link type="text/css" rel="stylesheet" href="/static/plugins/loaders/loaders.css">
<link type="text/css" rel="stylesheet" href="/static/plugins/OwO/OwO.min.css">
<style>
* {
box-sizing: border-box;
}
.native-list-one-head a, .native-list-one-content a{
opacity: 1;!important;
-webkit-transition: all .15s linear;