-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
.Format Function converts '+' to + even when contained inside a <time></time> tag #7488
Comments
This issue may actually trace back to the actual .Date and .Lastmod function. |
Thanks for getting in touch, but it feels like this is a question that would be better suited to the Hugo Discussion Forum. We prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug. You may also find the answers you search for in Hugo Documentation. |
The existing template code results in the + chartering being written in a form that is not valid for the datetime element when used in and <time> tag. This patch fixes this issue. references: https://discourse.gohugo.io/t/date-lastmod-return-43-in-place-of/27033 gohugoio/hugo#7488
- invalid year when using 2020 as a template, see gohugoio/hugo#8983 - timezone shouldn't use + but + see gohugoio/hugo#7488
- invalid year when using 2020 as a template, see gohugoio/hugo#8983 - timezone shouldn't use + but + see gohugoio/hugo#7488
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. |
What version of Hugo are you using (
hugo version
)?Hugo Static Site Generator v0.74.1/extended darwin/amd64 BuildDate: unknown
Does this issue reproduce with the latest release?
Yes. This is the latest version and I only initially noticed it after updating as I am trying to workout a different issue.
I suspect this is a bug as it would seem that:
would not conform to the specification for the tag as noted at https://www.w3schools.com/tags/att_time_datetime.asp
Seems there might be a need for the .Format function to be able to preserve the '+' character in some cases.
Example of code from a the Ananke theme I am currently using
Produces
The text was updated successfully, but these errors were encountered: