fix: 修复 WYSIWYG 清空内容 + 分屏工具栏 + XSS 防御(bulemondy消毒)

This commit is contained in:
2026-05-27 18:45:15 +08:00
parent 174d715e50
commit 1830f10e24
6 changed files with 113 additions and 106 deletions

View File

@ -1,6 +1,7 @@
package controller
import (
"html/template"
"net/http"
"strconv"
@ -102,10 +103,11 @@ func (ctrl *PostController) ShowPage(c *gin.Context) {
}
c.HTML(http.StatusOK, "posts/show.html", common.BuildPageData(c, gin.H{
"Title": post.Title,
"Post": post,
"UID": uid,
"ExtraCSS": "/static/css/posts.css",
"Title": post.Title,
"Post": post,
"PostBodyHTML": template.HTML(post.BodyHTML),
"UID": uid,
"ExtraCSS": "/static/css/posts.css",
}))
}