🛠 fix: links render hook

pull/446/head
Tomy Hsieh 2023-01-18 04:51:29 +08:00
parent e998514a53
commit c7c9d46d52
No known key found for this signature in database
GPG Key ID: 4E6AF0EEDD2205F8
1 changed files with 2 additions and 2 deletions

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>