后台:站点设置新增社交链接与自定义 JS 字段

social_links 以 JSON 数组存进 settings KV([{label,url}]),解码容错:
空串 / 坏 JSON / 缺 label 或 url 的条目一律丢弃,前台拿到空数组时区块
自动隐藏。custom_js 原样存取——它是站主自己的代码(统计脚本等),
做转义只会把脚本洗坏。后台表单与前台展示在下一笔前端提交里。
This commit is contained in:
Sakurasan
2026-09-27 03:34:43 +08:00
parent 75737034d9
commit 5dfa1550fb
3 changed files with 54 additions and 2 deletions
-1
View File
@@ -490,4 +490,3 @@ func TestProjectCRUD(t *testing.T) {
t.Errorf("after delete: got %v, want ErrNotFound", err)
}
}