summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/htmlUnescape.md
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-04 09:44:59 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-04 09:44:59 +0200
commit914cc85e22af2e6c28f24a5fc70de94e4b9f1b1b (patch)
treee7b5fcc856003415c613312c80ba2f301eeae03c /docs/content/en/functions/htmlUnescape.md
parenta6816db77574ba3d48a6414c97a53a691c34e705 (diff)
parent83bef6955e014d40c0f00db9cebe09113154e999 (diff)
Diffstat (limited to 'docs/content/en/functions/htmlUnescape.md')
-rw-r--r--docs/content/en/functions/htmlUnescape.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/content/en/functions/htmlUnescape.md b/docs/content/en/functions/htmlUnescape.md
new file mode 100644
index 000000000..d0ef7540c
--- /dev/null
+++ b/docs/content/en/functions/htmlUnescape.md
@@ -0,0 +1,28 @@
+---
+title: htmlUnescape
+linktitle: htmlUnescape
+description: Returns the given string with HTML escape codes un-escaped.
+godocref:
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-02-01
+categories: [functions]
+menu:
+ docs:
+ parent: "functions"
+keywords: []
+signature: ["htmlUnescape INPUT"]
+workson: []
+hugoversion:
+relatedfuncs: [htmlEscape]
+deprecated: false
+aliases: []
+---
+
+`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.
+
+```
+{{ htmlUnescape "Hugo &amp; Caddy &gt; Wordpress &amp; Apache" }} → "Hugo & Caddy > Wordpress & Apache"
+```