hugo/docs/content/en/functions/htmlEscape.md
2023-05-22 16:47:07 +02:00

469 B

title description categories menu keywords signature relatedfuncs
htmlEscape Returns the given string with the reserved HTML codes escaped.
functions
docs
parent
functions
strings
html
htmlEscape INPUT
htmlUnescape

In the result & becomes &amp; and so on. It escapes only: <, >, &, ' and ".

{{ htmlEscape "Hugo & Caddy > WordPress & Apache" }} → "Hugo &amp; Caddy &gt; WordPress &amp; Apache"