Skip to content

Commit

Permalink
tpl/tplimpl: Trim descriptions rather than just chomp
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Oct 12, 2024
1 parent 9b63552 commit 0398458
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tpl/tplimpl/embedded/templates/opengraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<meta property="og:title" content="{{ . }}">
{{- end }}

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

{{- with or .Params.locale site.Language.LanguageCode }}
Expand Down
4 changes: 2 additions & 2 deletions tpl/tplimpl/embedded/templates/schema.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<meta itemprop="name" content="{{ . }}">
{{- end }}

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

{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
Expand Down
4 changes: 2 additions & 2 deletions tpl/tplimpl/embedded/templates/twitter_cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<meta name="twitter:title" content="{{ . }}">
{{- end }}

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

{{- $twitterSite := "" }}
Expand Down

0 comments on commit 0398458

Please sign in to comment.