Hi. I’m having trouble with getting the .Media.Type
from RSS as alternative Output. I’m running the latest extended Hugo version on Windows. My code:
{{ range .AlternativeOutputFormats }}
{{ .MediaType.Type }}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}"> -->
{{ end }}
The result is:
application/rss+xml
<link rel="alternate" type="application/rss+xml" href="//localhost:1313/index.xml">
So the +
is not translating to a +
. I tried the following:
{{ range .AlternativeOutputFormats }}
{{ htmlUnescape .MediaType.Type | safeHTML }}
<link rel="{{ .Rel }}" type="{{ htmlUnescape .MediaType.Type | safeHTML }}" href="{{ .Permalink | safeURL }}">
{{ end }}
Not I get a better result:
application/rss+xml
<link rel="alternate" type="application/rss+xml" href="//localhost:1313/de/index.xml">
However, as you can see, the Unicode dezimal only gets translated if it is not within any html tags.
I don’t know if this is intended? Any solution to get the type to display properly?