Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 插入资源文件时不再去除 `[`、`(` 等符号 https://github.com/siyuan-note/siyuan/issues/6542

Liang Ding694ba7108d50
diff --git a/kernel/util/file.go b/kernel/util/file.go
index 526f91de8a..c1d7886925 100644
--- a/kernel/util/file.go
+++ b/kernel/util/file.go
@@ -123,21 +123,6 @@ func IsCorruptedSYData(data []byte) bool {
func FilterUploadFileName(name string) string {
ret := FilterFileName(name)
- ret = strings.ReplaceAll(ret, "~", "")
- //ret = strings.ReplaceAll(ret, "_", "") // 插入资源文件时允许下划线 https://github.com/siyuan-note/siyuan/issues/3534
- ret = strings.ReplaceAll(ret, "[", "")
- ret = strings.ReplaceAll(ret, "]", "")
- ret = strings.ReplaceAll(ret, "(", "")
- ret = strings.ReplaceAll(ret, ")", "")
- ret = strings.ReplaceAll(ret, "!", "")
- ret = strings.ReplaceAll(ret, "`", "")
- ret = strings.ReplaceAll(ret, "&", "")
- ret = strings.ReplaceAll(ret, "{", "")
- ret = strings.ReplaceAll(ret, "}", "")
- ret = strings.ReplaceAll(ret, "=", "")
- ret = strings.ReplaceAll(ret, "#", "")
- ret = strings.ReplaceAll(ret, "%", "")
- ret = strings.ReplaceAll(ret, "$", "")
return ret
}