Skip to content

Commit a2f09c8

Browse files
chalinadityatelange
authored andcommitted
[PATCH] tpl/tplimpl: Trim descriptions rather than just chomp
from gohugoio/hugo@0398458
1 parent 3f20d3c commit a2f09c8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

layouts/partials/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 }}

layouts/partials/templates/twitter_cards.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
<meta name="twitter:title" content="{{ . }}">
2020
{{- end }}
2121

22-
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }}
23-
<meta name="twitter:description" content="{{ . }}">
22+
{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape }}
23+
<meta name="twitter:description" content="{{ trim . "\n\r\t " }}">
2424
{{- end }}
2525

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

0 commit comments

Comments
 (0)