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

tpl: Escape .Title in built-in image and link render hooks #12411

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

bep
Copy link
Member

@bep bep commented Apr 22, 2024

These templates were added in Hugo v0.123.0, and in the common case disabled by default, see https://gohugo.io/getting-started/configuration-markup/#renderhooksimageenabledefault

@bep bep requested a review from jmooring April 22, 2024 09:34
Copy link
Member

@jmooring jmooring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested your link and image examples against https://spec.commonmark.org/dingus/. With the changes below our output (with html/template) matches theirs.

@bep bep changed the title tpl: Escape .Title and .Text in built-in image and link render hooks tpl: Escape .Title in built-in image and link render hooks Apr 22, 2024
Co-authored-by: Joe Mooring <joe@mooring.com>
@bep bep merged commit 15a4b9b into gohugoio:master Apr 22, 2024
8 checks passed
@00xc
Copy link

00xc commented Apr 23, 2024

This was mentioned as a security fix in the v0.125.3 release notes. Are you planning to request a CVE?

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

Successfully merging this pull request may close these issues.

None yet

3 participants