hugoDocs/content/functions/plainify.md
2017-03-27 16:32:31 -05:00

32 lines
616 B
Markdown

---
title: plainify
linktitle: plainify
description: Strips any HTML and returns the plain text version of the provided string.
godocref:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [functions]
tags: [strings]
ns:
signature: ["plainify INPUT"]
workson: []
hugoversion:
relatedfuncs: [jsonify]
deprecated: false
aliases: []
---
`plainify` strips any HTML and returns the plain text version of the provided string.
```
{{ "<b>BatMan</b>" | plainify }} → "BatMan"
```
See also the [`.PlainWords`, `.Plain`, and `.RawContent` page variables][pagevars].
[pagevars]: /variables/page/