Skip to content

Commit 0398458

Browse files
authored
tpl/tplimpl: Trim descriptions rather than just chomp
1 parent 9b63552 commit 0398458

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tpl/tplimpl/embedded/templates/opengraph.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<meta property="og:title" content="{{ . }}">
99
{{- end }}
1010

11-
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }}
12-
<meta property="og:description" content="{{ . }}">
11+
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape }}
12+
<meta property="og:description" content="{{ trim . "\n\r\t " }}">
1313
{{- end }}
1414

1515
{{- with or .Params.locale site.Language.LanguageCode }}

tpl/tplimpl/embedded/templates/schema.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<meta itemprop="name" content="{{ . }}">
33
{{- end }}
44

5-
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }}
6-
<meta itemprop="description" content="{{ . }}">
5+
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape }}
6+
<meta itemprop="description" content="{{ trim . "\n\r\t " }}">
77
{{- end }}
88

99
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}

tpl/tplimpl/embedded/templates/twitter_cards.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<meta name="twitter:title" content="{{ . }}">
1111
{{- end }}
1212

13-
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }}
14-
<meta name="twitter:description" content="{{ . }}">
13+
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape }}
14+
<meta name="twitter:description" content="{{ trim . "\n\r\t " }}">
1515
{{- end }}
1616

1717
{{- $twitterSite := "" }}

0 commit comments

Comments
 (0)