Skip to content

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

:art: Improve auto email link parsing https://github.com/siyuan-note/siyuan/issues/16629

Daniel7679adf6d578
diff --git a/kernel/util/path.go b/kernel/util/path.go
index 87a35604ec..e2f39a6ef7 100644
--- a/kernel/util/path.go
+++ b/kernel/util/path.go
@@ -165,6 +165,14 @@ func IsRelativePath(dest string) bool {
if '/' == dest[0] {
return false
}
+
+ // 检查特定协议前缀
+ lowerDest := strings.ToLower(dest)
+ if strings.HasPrefix(lowerDest, "mailto:") ||
+ strings.HasPrefix(lowerDest, "tel:") ||
+ strings.HasPrefix(lowerDest, "sms:") {
+ return false
+ }
return !strings.Contains(dest, ":/") && !strings.Contains(dest, ":\\")
}