-
-
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
ISO8601 issue with internal template #5236
Comments
How is this a problem? |
FYI, the escaped HTML for |
Hey. This is an issue because
|
This issue clearly isn't anything major but I made an upstream PR to have Go's |
This did not fix the issue. I still get <meta property="og:updated_time" content="2018-09-20T16:37:20+12:00"/> but this on template works:
|
@rdwatters True, but just for the sake of consistency. |
@FelicianoTech It's not working for me still. |
@akshaybabloo It's not going to until the upstream PR that I linked is merged and a new Hugo release based on that new Go version is released as well. |
The `safeHTMLAttr` function operates on a full attribute definition, not just within the attribute value. Docs: https://gohugo.io/functions/safehtmlattr/ For `opengraph.html`, run the whole `content` HTML attribute through `safeHTMLAttr`. That will preserve `+` signs in formatted dates. For `vimeo_simple.html`, `safeHTMLAttr` was in the context of an attribute value, thus having no effect. In this case we could replace it with `safeURL`, but since the code is coming from an API it is safer to just let Go's template engine sanitize the value as it already does with `provider_url`. Fixes gohugoio#5236 (no need to change Go upstream) Related to gohugoio#5246
The `safeHTMLAttr` function operates on a full attribute definition, not just within the attribute value. Docs: https://gohugo.io/functions/safehtmlattr/ For `opengraph.html`, run the whole `content` HTML attribute through `safeHTMLAttr`. That will preserve `+` signs in formatted dates. For `vimeo_simple.html`, `safeHTMLAttr` was in the context of an attribute value, thus having no effect. In this case we could replace it with `safeURL`, but since the code is coming from an API it is safer to just let Go's template engine sanitize the value as it already does with `provider_url`. Fixes #5236 (no need to change Go upstream) Related to #5246
I've noticed that schema template is still escaping the plus and not using hugo/tpl/tplimpl/embedded/templates/schema.html Lines 5 to 6 in c3d433a
Might have been missed? |
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. |
This might not be much of an issue, but when using the internal template such as OpenGraph the datetime's offset
+
or-
is not shown. Exampleis shown as
Instead of
I am using Hugo v0.48/extended windows/amd64.
The text was updated successfully, but these errors were encountered: