From 7679adf6d578a37c275b7cba9985c5a7145845ef Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 28 Dec 2025 16:39:13 +0800 Subject: [PATCH] :art: Improve auto email link parsing https://github.com/siyuan-note/siyuan/issues/16629 Signed-off-by: Daniel <845765@qq.com> --- kernel/util/path.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/util/path.go b/kernel/util/path.go index 87a35604e..e2f39a6ef 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, ":\\") }