-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
In nested range the map key and value become are inverted. #11112
Comments
I have not looked closely at your templates, but this issue rings a bell: |
Verified. The problem was introduced in v0.106.0, where we merged the changes from golang/go@be7068f. So, upstream fixed one thing but broke another. |
To reproduce:
|
I'm guessing they will merge that one fast, so I will hold on with any release until I can get that one into Hugo. |
The template packages are based on go1.20.5 with the patch in 15d330e1aa7dea2a9ff981ec8130aeb06da900a1 added. Fixes gohugoio#11112
The template packages are based on go1.20.5 with the patch in befec5ddbbfbd81ec84e74e15a38044d67f8785b added. Fixes gohugoio#11112
The template packages are based on go1.20.5 with the patch in befec5ddbbfbd81ec84e74e15a38044d67f8785b added. Fixes gohugoio#11112
The template packages are based on go1.20.5 with the patch in befec5ddbbfbd81ec84e74e15a38044d67f8785b added. This also includes a security fix that now disallows Go template actions in JS literals (inside backticks). This will throw an error saying "... appears in a JS template literal". If you're really sure this isn't a security risk in your case, you can revert to the old behaviour: ```toml [security] [security.gotemplates] allowActionJSTmpl = true ``` See golang/go#59234 Fixes gohugoio#11112
The template packages are based on go1.20.5 with the patch in befec5ddbbfbd81ec84e74e15a38044d67f8785b added. This also includes a security fix that now disallows Go template actions in JS literals (inside backticks). This will throw an error saying "... appears in a JS template literal". If you're really sure this isn't a security risk in your case, you can revert to the old behaviour: ```toml [security] [security.gotemplates] allowActionJSTmpl = true ``` See golang/go#59234 Fixes gohugoio#11112
The template packages are based on go1.20.5 with the patch in befec5ddbbfbd81ec84e74e15a38044d67f8785b added. This also includes a security fix that now disallows Go template actions in JS literals (inside backticks). This will throw an error saying "... appears in a JS template literal". If you're really sure this isn't a security risk in your case, you can revert to the old behaviour: ```toml [security] [security.gotemplates] allowActionJSTmpl = true ``` See golang/go#59234 Fixes gohugoio#11112
The template packages are based on go1.20.5 with the patch in befec5ddbbfbd81ec84e74e15a38044d67f8785b added. This also includes a security fix that now disallows Go template actions in JS literals (inside backticks). This will throw an error saying "... appears in a JS template literal". If you're really sure this isn't a security risk in your case, you can revert to the old behaviour: ```toml [security] [security.gotemplates] allowActionJSTmpl = true ``` See golang/go#59234 Fixes #11112
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I upgraded my hugo from v0.99 to v0.113 yesterday, I get a strange output from
range $key, $value = range .
, the value of $key is output as $value, and the value of $value is output as $key.The full source code from https://github.com/fastbootstrap/atlassian-design-for-bootstrap/blob/main/site/layouts/shortcodes/class-api.html
The warning output from
{{ range $key, $value = . }}
The normal output from Hugo v0.99
Since upgrade to Hugo v0.113, The output value key become value, value become key.
Data from https://github.com/fastbootstrap/atlassian-design-for-bootstrap/blob/main/site/data/css.yml
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
The text was updated successfully, but these errors were encountered: