fix: use safeHTML for description in metadata (#334)
parent
cd9ab9e48e
commit
87fdde4808
|
@ -7,7 +7,7 @@
|
|||
{{ $keywords := default .Site.Params.Keywords .Keywords }}
|
||||
|
||||
{{- with partial "utils/description" . }}
|
||||
<meta name="description" content="{{ trim (. | plainify) "\n" }}" />
|
||||
<meta name="description" content="{{ trim (. | plainify) "\n" | safeHTML }}" />
|
||||
{{- end }}
|
||||
{{- with $keywords }}
|
||||
<meta name="keywords" content="{{ delimit . "," }}" />
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta property="og:site_name" content="{{ . }}" />
|
||||
{{- end }}
|
||||
{{- with partial "utils/description" . }}
|
||||
<meta property="og:description" content="{{ trim (. | plainify) "\n" }}" />
|
||||
<meta property="og:description" content="{{ trim (. | plainify) "\n" | safeHTML }}" />
|
||||
{{- end }}
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"name": "{{ .Site.Title }}",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
{{- with partial "utils/description" . }}
|
||||
"description": "{{ trim (. | plainify) "\n" }}",
|
||||
"description": "{{ trim (. | plainify) "\n" | safeHTML }}",
|
||||
{{- end }}
|
||||
"thumbnailUrl": "{{ $thumbnail }}"
|
||||
{{- with .Site.Params.GeekdocContentLicense }},
|
||||
|
@ -26,7 +26,7 @@
|
|||
"headline": "{{ (partial "utils/title" .) | safeJS }}",
|
||||
"alternativeHeadline": "{{ .Params.lead }}",
|
||||
{{- with partial "utils/description" . }}
|
||||
"description": "{{ trim (. | plainify) "\n" }}",
|
||||
"description": "{{ trim (. | plainify) "\n" | safeHTML }}",
|
||||
{{- end }}
|
||||
"inLanguage": {{ .Site.Language.Lang }},
|
||||
"isFamilyFriendly": "true",
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
{{- end }}
|
||||
<meta name="twitter:title" content="{{ partial "utils/title" . }}" />
|
||||
{{- with partial "utils/description" . }}
|
||||
<meta name="twitter:description" content="{{ trim (. | plainify) "\n" }}" />
|
||||
<meta name="twitter:description" content="{{ trim (. | plainify) "\n" | safeHTML }}" />
|
||||
{{- end }}
|
||||
{{- with .Site.Social.twitter -}}
|
||||
<meta name="twitter:site" content="@{{ . }}" />
|
||||
|
|
Loading…
Reference in New Issue