support full HTML captions for image shortcode

This commit is contained in:
2019-12-17 11:39:23 -05:00
parent 1b97c6b2de
commit c87bfd7797
22 changed files with 111 additions and 113 deletions
+3 -3
View File
@@ -29,7 +29,7 @@
<p style="text-align: center;">
<img src="{{ $image.Permalink }}" width="{{ $displayWidth }}" height="{{ $displayHeight }}"
{{- with .Get "alt" }} alt="{{ . }}"{{ end }}
{{- with .Get "caption" }} title="{{ . }}"{{ end }}>
{{ with .Get "caption" }}<br>{{ . }}{{ end -}}
{{- with .Get "alt" }} alt="{{ . | safeHTMLAttr }}" title="{{ . | safeHTMLAttr }}"{{ end }}
{{- with .Inner }} alt="{{ . | plainify | safeHTMLAttr }}" title="{{ . | plainify | safeHTMLAttr }}"{{ end }}>
{{ with .Inner }}<br>{{ . | safeHTML }}{{ end -}}
</p>