mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-10-19 01:20:22 -04:00
738 B
738 B
title | linktitle | description | godocref | date | publishdate | lastmod | categories | tags | signature | workson | hugoversion | relatedfuncs | deprecated | aliases | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
htmlEscape | Returns the given string with the critical reserved HTML codes escaped. | 2017-02-01 | 2017-02-01 | 2017-02-01 |
|
|
|
false |
htmlEscape
returns the given string with the critical reserved HTML codes escaped, such that &
becomes &
and so on. It escapes only: <
, >
, &
, '
and "
.
Bear in mind that, unless content is passed to safeHTML
, output strings are escaped usually by the processor anyway.
{{ htmlEscape "Hugo & Caddy > Wordpress & Apache" }} → "Hugo & Caddy > Wordpress & Apache"