package templates import ( "bytes" "fmt" gotemplate "html/template" "regexp" "sort" "strings" "testing" "time" "github.com/flamego/template" "github.com/tamakyi/TamaBox/internal/conf" "github.com/tamakyi/TamaBox/internal/db" "github.com/tamakyi/TamaBox/internal/i18n" "github.com/tamakyi/TamaBox/internal/security/moderation" templatepkg "github.com/tamakyi/TamaBox/internal/template" "github.com/tamakyi/TamaBox/internal/theme" ) // 审核严格度下拉框的解析:不依赖属性的书写顺序或是否存在额外属性 // (模板可能被页面编辑器注入 data-* 属性),因此用正则而不是精确子串匹配。 var ( strictnessOptionRe = regexp.MustCompile(`