🛠 fix: links render hook

This commit is contained in:
Tomy Hsieh
2023-01-18 04:51:29 +08:00
parent e998514a53
commit c7c9d46d52
+2 -2
View File
@@ -1,3 +1,3 @@
<a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"{{ end }} {{ if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
<a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"{{ end }} {{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noreferrer noopener"{{ end }}>
{{- .Text | safeHTML -}}
</a>
</a>