diff options
Diffstat (limited to 'docs/content/en/functions/transform/XMLEscape.md')
-rw-r--r-- | docs/content/en/functions/transform/XMLEscape.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/content/en/functions/transform/XMLEscape.md b/docs/content/en/functions/transform/XMLEscape.md index 17ed2a13d..d0aafc4bd 100644 --- a/docs/content/en/functions/transform/XMLEscape.md +++ b/docs/content/en/functions/transform/XMLEscape.md @@ -10,6 +10,8 @@ action: signatures: [transform.XMLEscape INPUT] --- +{{< new-in 0.121.0 >}} + The `transform.XMLEscape` function removes [disallowed characters] as defined in the XML specification, then escapes the result by replacing the following characters with [HTML entities]: - `"` → `"` @@ -24,7 +26,7 @@ The `transform.XMLEscape` function removes [disallowed characters] as defined in For example: ```go-html-template -transform.XMLEscape "<p>abc</p>" → <p>abc</p> +{{ transform.XMLEscape "<p>abc</p>" }} → <p>abc</p> ``` When using `transform.XMLEscape` in a template rendered by Go's [html/template] package, declare the string to be safe HTML to avoid double escaping. For example, in an RSS template: |