summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/htmlUnescape.md
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-10-21 10:22:28 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-10-21 10:22:28 +0200
commit27aef3f1fbf657137e825f30bb50dda393618a6f (patch)
treebcc05254f2977e3cc75d7dcb4cbaac5625cf7a1b /docs/content/en/functions/htmlUnescape.md
parent39121de4d991bdcf5f202da4d8d81a8ac6c149fc (diff)
parentb9bd35d72e14932fb6588ff62b90cddef0a060fc (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"
+```