mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Merge commit 'f96384a3b596f9bc0a3a035970b09b2c601f0ccb'
This commit is contained in:
@@ -1,25 +1,17 @@
|
||||
---
|
||||
title: htmlEscape
|
||||
linktitle:
|
||||
description: Returns the given string with the reserved HTML codes escaped.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2017-02-01
|
||||
categories: [functions]
|
||||
menu:
|
||||
docs:
|
||||
parent: "functions"
|
||||
parent: functions
|
||||
keywords: [strings, html]
|
||||
signature: ["htmlEscape INPUT"]
|
||||
workson: []
|
||||
hugoversion:
|
||||
relatedfuncs: [htmlUnescape]
|
||||
deprecated: false
|
||||
aliases: []
|
||||
---
|
||||
|
||||
In the result `&` becomes `&` and so on. It escapes only: `<`, `>`, `&`, `'` and `"`.
|
||||
|
||||
```
|
||||
```go-html-template
|
||||
{{ htmlEscape "Hugo & Caddy > WordPress & Apache" }} → "Hugo & Caddy > WordPress & Apache"
|
||||
```
|
||||
|
Reference in New Issue
Block a user