I have a partial where I want to render a tag based on a parameter value:
<{{ .tag | safeHTML }} class="{{.class}}">
...
</{{ .tag | safeHTML }}>
I call the partial with (dict "tag" "div")
say.
The renderer is escaping this as literal text, so it renders the letters <div class="foo">
rather than rendering an actual div tag. Same thing with the closing tag.
It works if I do this instead:
{{ printf "<%s" .tag | safeHTML }} ...
So there is something hooky going on with <
or </
next to dynamic content, even when it is marked as safe.