summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/safe/URL.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/functions/safe/URL.md')
-rw-r--r--docs/content/en/functions/safe/URL.md27
1 files changed, 10 insertions, 17 deletions
diff --git a/docs/content/en/functions/safe/URL.md b/docs/content/en/functions/safe/URL.md
index e4b3224da..44bed8064 100644
--- a/docs/content/en/functions/safe/URL.md
+++ b/docs/content/en/functions/safe/URL.md
@@ -3,23 +3,17 @@ title: safe.URL
description: Declares the given string as a safe URL or URL substring.
categories: []
keywords: []
-action:
- aliases: [safeURL]
- related:
- - functions/safe/CSS
- - functions/safe/HTML
- - functions/safe/HTMLAttr
- - functions/safe/JS
- - functions/safe/JSStr
- returnType: template.URL
- signatures: [safe.URL INPUT]
-toc: true
+params:
+ functions_and_methods:
+ aliases: [safeURL]
+ returnType: template.URL
+ signatures: [safe.URL INPUT]
aliases: [/functions/safeurl]
---
## Introduction
-{{% include "functions/_common/go-html-template-package.md" %}}
+{{% include "/_common/functions/go-html-template-package.md" %}}
## Usage
@@ -33,8 +27,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#URL
-
## Example
Without a safe declaration:
@@ -50,9 +42,8 @@ Hugo renders the above to:
<a href="#ZgotmplZ">IRC</a>
```
-{{% 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:
@@ -66,3 +57,5 @@ Hugo renders the above to:
```html
<a href="irc://irc.freenode.net/#golang">IRC</a>
```
+
+[Go documentation]: https://pkg.go.dev/html/template#URL