Allow html in figure caption.

This commit is contained in:
panr 2020-09-27 16:25:03 +02:00
parent 6856982e4a
commit 08644e95c3
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<figure class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" > <figure class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" >
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} /> <img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} />
{{ if .Get "caption" }} {{ if .Get "caption" }}
<figcaption class="{{ with .Get "captionPosition"}}{{ . }}{{ else -}} center {{- end }}" {{ with .Get "captionStyle" }} style="{{ . | safeCSS }}" {{ end }}>{{ .Get "caption" }}</figcaption> <figcaption class="{{ with .Get "captionPosition"}}{{ . }}{{ else -}} center {{- end }}" {{ with .Get "captionStyle" }} style="{{ . | safeCSS }}" {{ end }}>{{ .Get "caption" | safeHTML }}</figcaption>
{{ end }} {{ end }}
</figure> </figure>
{{ end }} {{ end }}

File diff suppressed because one or more lines are too long