mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
19 lines
592 B
Markdown
19 lines
592 B
Markdown
---
|
|
title: htmlUnescape
|
|
description: Returns the given string with HTML escape codes un-escaped.
|
|
categories: [functions]
|
|
menu:
|
|
docs:
|
|
parent: functions
|
|
keywords: []
|
|
signature: ["htmlUnescape INPUT"]
|
|
relatedfuncs: [htmlEscape]
|
|
---
|
|
|
|
`htmlUnescape` returns the given string with HTML escape codes un-escaped.
|
|
|
|
Remember to pass the output of this to `safeHTML` if fully un-escaped characters are desired. Otherwise, the output will be escaped again as normal.
|
|
|
|
```go-html-template
|
|
{{ htmlUnescape "Hugo & Caddy > WordPress & Apache" }} → "Hugo & Caddy > WordPress & Apache"
|
|
```
|