Skip to content

String functions within render hooks see HAHAHUGOSHORTCODE #7416

@jmooring

Description

@jmooring

What version of Hugo are you using (hugo version)?

$ hugo version
Hugo Static Site Generator v0.73.0-DEV/extended linux/amd64 BuildDate: unknown

Does this issue reproduce with the latest release?

Yes

To Reproduce

git clone --single-branch -b hugo-github-issue-7416 https://github.com/jmooring/hugo-testing hugo-github-issue-7416
cd hugo-github-issue-7416
hugo server

Then visit http://localhost:1313/post/test/.

Description

Content page contains the following markdown:

[Other Page]({{< relref "0123456789abcdef.md" >}})

layouts/_default/_markup/render-link.html contains this code:

{{ substr .Destination 0 16 }}

This renders:

HAHAHUGOSHORTCOD

Other

Reported in https://discourse.gohugo.io/t/render-link-functionality-not-working/26358/.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions