diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2025-04-10 13:04:51 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2025-04-10 13:04:51 +0200 |
commit | 653f1c1d462332bccf303a5040e5cd99c89a4378 (patch) | |
tree | c993984f169a240567526e9993261241c0cda771 /docs/content/en/functions/safe/CSS.md | |
parent | 208a0de6c31354df6f9463d49e90db9dec935169 (diff) | |
parent | 5be51ac3db225d5df501ed1fa1499c41d97dbf65 (diff) | |
download | hugo-653f1c1d462332bccf303a5040e5cd99c89a4378.tar.gz hugo-653f1c1d462332bccf303a5040e5cd99c89a4378.zip |
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
Diffstat (limited to 'docs/content/en/functions/safe/CSS.md')
-rw-r--r-- | docs/content/en/functions/safe/CSS.md | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/docs/content/en/functions/safe/CSS.md b/docs/content/en/functions/safe/CSS.md index 5d67789b6..12ebbf8aa 100644 --- a/docs/content/en/functions/safe/CSS.md +++ b/docs/content/en/functions/safe/CSS.md @@ -3,23 +3,17 @@ title: safe.CSS description: Declares the given string as a safe CSS string. categories: [] keywords: [] -action: - aliases: [safeCSS] - related: - - functions/safe/HTML - - functions/safe/HTMLAttr - - functions/safe/JS - - functions/safe/JSStr - - functions/safe/URL - returnType: template.CSS - signatures: [safe.CSS INPUT] -toc: true +params: + functions_and_methods: + aliases: [safeCSS] + returnType: template.CSS + signatures: [safe.CSS INPUT] aliases: [/functions/safecss] --- ## Introduction -{{% include "functions/_common/go-html-template-package.md" %}} +{{% include "/_common/functions/go-html-template-package.md" %}} ## Usage @@ -34,8 +28,6 @@ Use of this type presents a security risk: the encapsulated content should come See the [Go documentation] for details. -[Go documentation]: https://pkg.go.dev/html/template#CSS - ## Example Without a safe declaration: @@ -51,9 +43,8 @@ Hugo renders the above to: <p style="ZgotmplZ">foo</p> ``` -{{% note %}} -`ZgotmplZ` is a special value that indicates that unsafe content reached a CSS or URL context at runtime. -{{% /note %}} +> [!note] +> `ZgotmplZ` is a special value that indicates that unsafe content reached a CSS or URL context at runtime. To declare the string as safe: @@ -67,3 +58,5 @@ Hugo renders the above to: ```html <p style="color: red;">foo</p> ``` + +[Go documentation]: https://pkg.go.dev/html/template#CSS |