diff options
author | Nicholas Johnson <mail@nicholasjohnson.ch> | 2024-06-28 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <mail@nicholasjohnson.ch> | 2024-06-28 00:00:00 +0000 |
commit | 821b58957a5625ac30ce5c5c3a588b8eb19f99a0a0cbb2e71a1ef67d89c9c58c (patch) | |
tree | 395cdab752412c89a23c15426e8833849dce6846de97edb58ea4801ea83c4285 | |
parent | 5dedbac7a3de4fcbf4d13dbeeec82dd2f277c21e6d7f201def813a6776196e54 (diff) | |
download | hugo-theme-journal-821b58957a5625ac30ce5c5c3a588b8eb19f99a0a0cbb2e71a1ef67d89c9c58c.tar.gz hugo-theme-journal-821b58957a5625ac30ce5c5c3a588b8eb19f99a0a0cbb2e71a1ef67d89c9c58c.zip |
Revert "Don't add rel="noreferrer" to non-web links"v1.3.5
This reverts commit f34e453196b85e756b16f5ff668d15c2462948e6778657907ff52821d360309b.
Adding rel="noreferrer" to non-http-prefixed links was believed to be a
noop, but this overlooks relative links. For privacy reasons, relative
links must not send referrer headers.
-rw-r--r-- | layouts/_default/_markup/render-link.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 5ffb876..6254ed8 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1,2 +1,2 @@ {{ $emoji := cond (and (not (.Page.Params.makerefs | default true)) (.Page.Params.showlinkemoji | default true)) (emojify ":link: ") "" -}} -{{ $emoji }}<a class="link" href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} rel="noreferrer"{{ end }}>{{ .Text | safeHTML }}</a>
\ No newline at end of file +{{ $emoji }}<a class="link" href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }} rel="noreferrer">{{ .Text | safeHTML }}</a> |