safeHTMLAttr
Syntax
safeHTMLAttr INPUT
Example: Given a site-wide config.toml
that contains this menu entry:
[[menu.main]]
name = "IRC: #golang at freenode"
url = "irc://irc.freenode.net/#golang"
<a href="{{ .URL }}">
→<a href="#ZgotmplZ">
<a {{ printf "href=%q" .URL | safeHTMLAttr }}>
→<a href="irc://irc.freenode.net/#golang">