From 409003f2bf257f93412be03c282d42c8e485a161 Mon Sep 17 00:00:00 2001 From: geekifan Date: Mon, 5 May 2025 14:54:12 +0800 Subject: [PATCH] fix: use 'mailto:' in sidebar email button --- layouts/partials/sidebar.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index d6baee3..fe1ceb4 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -63,8 +63,7 @@ {{ else if eq .type "twitter" }} {{ $url = printf "https://twitter.com/%s" .id }} {{ else if eq .type "email" }} - {{ $emailParts := split .id "@" }} - {{ $url = printf "javascript:location.href = 'mailto:' + ['%s','%s'].join('@')" (index $emailParts 0) (index $emailParts 1) }} + {{ $url = printf "mailto:%s" .id }} {{ else if eq .type "rss" }} {{ $url = "index.xml" | relLangURL }} {{ else }}