I’m trying to populate some meta data fields with text used as descriptions. This description text is used in headers etc elsewhere and sometimes I don’t want words to be separated across lines and so use .
e.g. description = "The shop closes in 12 mins"
{{ else if .Params.description }}
<meta
property="og:description"
content="{{ .Params.description | plainify }}"
/>
{{ end }}
results in
<meta
property="og:description"
content="The shop closes in 12&nbsp;mins"
/>
I’d rather it render to:
<meta
property="og:description"
content="The shop closes in 12 mins"
/>
Is this possible using something other than plainify?
The docs state for plainify “Strips any HTML and returns the plain text version of the provided string”, and I naively assumed that would include HTML character codes. Perhaps that should read “any HTML elements”?