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. Example
date: 2018-09-20T16:37:20+12:00
is shown as
<meta property="og:updated_time" content="2018-09-20T16:37:20+12:00"/>
Instead of
<meta property="og:updated_time" content="2018-09-20T16:37:20+12:00"/>
I am using Hugo v0.48/extended windows/amd64.
How is this a problem?
@akshaybabloo.
FYI, the escaped HTML for + wasn't an issue when I tested it locally using Facebook's OGP's debugger. It still converted to UNIX time effectively.
Hey. This is an issue because safeHTMLAttr shouldn't escape "+"s but it is. I see two components here:
safeHTML when it should probably be using safeHTMLAttr.html/template Go package. I'm investigating if I can do a PR upstream if I understand it well enough.This issue clearly isn't anything major but I made an upstream PR to have Go's html/template stop escaping plus signs and then a PR for Hugo to use the right function.
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:
{{ print "2018-09-20T16:37:20+12:00" | safeHTML }}
@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.
I've noticed that schema template is still escaping the plus and not using safeHTMLAttr:
Might have been missed?
Most helpful comment
@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.