mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-03 05:13:56 -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"
|
|
```
|