Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'

This commit is contained in:
Bjørn Erik Pedersen
2023-12-04 15:24:01 +01:00
810 changed files with 24147 additions and 7766 deletions

View File

@@ -1,29 +1,24 @@
---
title: safe.HTMLAttr
linkTitle: safeHTMLAttr
description: Declares the provided string as a safe HTML attribute.
categories: [functions]
description: Declares the given key/value pair as a safe HTML attribute.
categories: []
keywords: []
menu:
docs:
parent: functions
function:
action:
aliases: [safeHTMLAttr]
related:
- functions/safe/CSS
- functions/safe/HTML
- functions/safe/JS
- functions/safe/JSStr
- functions/safe/URL
returnType: template.HTMLAttr
signatures: [safe.HTMLAttr INPUT]
relatedFunctions:
- safe.CSS
- safe.HTML
- safe.HTMLAttr
- safe.JS
- safe.JSStr
- safe.URL
aliases: [/functions/safehtmlattr]
---
Given a site configuration that contains this menu entry:
{{< code-toggle file="hugo" >}}
{{< code-toggle file=hugo >}}
[[menu.main]]
name = "IRC"
url = "irc://irc.freenode.net/#golang"
@@ -35,7 +30,7 @@ Attempting to use the `url` value directly in an attribute:
{{ range site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
```
```
Will produce: