From 7b21b2e76f5e1839f34a6a73122ef338235c4b96 Mon Sep 17 00:00:00 2001 From: JB Date: Fri, 14 Oct 2022 12:16:53 +0200 Subject: [PATCH 1/2] Don't use self-closing generator tag --- content/en/functions/hugo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/functions/hugo.md b/content/en/functions/hugo.md index 1792f5a8d..40a003629 100644 --- a/content/en/functions/hugo.md +++ b/content/en/functions/hugo.md @@ -22,7 +22,7 @@ aliases: [] `hugo` returns an instance that contains the following functions: hugo.Generator -: `` tag for the version of Hugo that generated the site. `hugo.Generator` outputs a *complete* HTML tag; e.g. `` +: `` tag for the version of Hugo that generated the site. `hugo.Generator` outputs a *complete* HTML tag; e.g. `` hugo.Version : the current version of the Hugo binary you are using e.g. `0.63.2` From f52af8e4a7f1882d4be45d978f22ab1952de8eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 24 Oct 2022 15:28:03 +0200 Subject: [PATCH 2/2] tpl/encoding: Add noHTMLEscape option to jsonify --- content/en/functions/jsonify.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/content/en/functions/jsonify.md b/content/en/functions/jsonify.md index 28b90534c..3aa38c8c4 100644 --- a/content/en/functions/jsonify.md +++ b/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/