Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded image render hook does not retain fragment and query string #12468

Closed
jmooring opened this issue May 7, 2024 · 0 comments · Fixed by #12469
Closed

Embedded image render hook does not retain fragment and query string #12468

jmooring opened this issue May 7, 2024 · 0 comments · Fixed by #12469

Comments

@jmooring
Copy link
Member

jmooring commented May 7, 2024

Reference: https://discourse.gohugo.io/t/the-embeded-image-render-hook-removes-uri-fragment-of-src-attribute/49684

The embedded link render hook retains the fragment and query string...

{{- $href = .RelPermalink -}}
{{- with $u.RawQuery -}}
{{- $href = printf "%s?%s" $href . -}}
{{- end -}}
{{- with $u.Fragment -}}
{{- $href = printf "%s#%s" $href . -}}
{{- end -}}

But the embedded image render hook does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant