summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/safe/CSS.md
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2025-04-10 13:04:51 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2025-04-10 13:04:51 +0200
commit653f1c1d462332bccf303a5040e5cd99c89a4378 (patch)
treec993984f169a240567526e9993261241c0cda771 /docs/content/en/functions/safe/CSS.md
parent208a0de6c31354df6f9463d49e90db9dec935169 (diff)
parent5be51ac3db225d5df501ed1fa1499c41d97dbf65 (diff)
downloadhugo-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.md27
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