aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/content/en/functions/transform/HTMLUnescape.md
blob: c0774232fcbf59cf43df875d221caadd174a897b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
title: transform.HTMLUnescape
linkTitle: htmlUnescape
description: Returns the given string with HTML escape codes un-escaped.
categories: [functions]
keywords: []
menu:
  docs:
    parent: functions
function:
  aliases: [htmlUnescape]
  returnType: string
  signatures: [transform.HTMLUnescape INPUT]
relatedFunctions:
  - transform.HTMLEscape
  - transform.HTMLUnescape
aliases: [/functions/htmlunescape]
---

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"
```