summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-10-24 15:28:03 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-10-24 17:21:42 +0200
commit09e10110a35cd9f0df6227a66186fd1df0c93414 (patch)
treefead128e70e74ee652f9ba7e8c5c698d8301f834 /docs
parent2ef60dbd2d9a04a8a1bb4fcdee11a7a32d2416f8 (diff)
tpl/encoding: Add noHTMLEscape option to jsonify
Diffstat (limited to 'docs')
-rw-r--r--docs/content/en/functions/jsonify.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/content/en/functions/jsonify.md b/docs/content/en/functions/jsonify.md
index 28b90534c..3aa38c8c4 100644
--- a/docs/content/en/functions/jsonify.md
+++ b/docs/content/en/functions/jsonify.md
@@ -32,6 +32,17 @@ more copies of *indent* according to the indentation nesting.
{{ dict "title" .Title "content" .Plain | jsonify (dict "prefix" " " "indent" " ") }}
```
+## Jsonify options
+
+indent ("")
+: Indendation to use.
+
+prefix ("")
+: Indentation prefix.
+
+noHTMLEscape (false)
+: Disable escaping of problematic HTML characters inside JSON quoted strings. The default behavior is to escape &, <, and > to \u0026, \u003c, and \u003e to avoid certain safety problems that can arise when embedding JSON in HTML.
+
See also the `.PlainWords`, `.Plain`, and `.RawContent` [page variables][pagevars].
[pagevars]: /variables/page/