Allow for apostrophe ' in image alt tag
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-08-04 22:43:06 +02:00
parent 057916b6d9
commit f2295f37f9
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@
{{- end }}
<img src="{{ .Get "src" | relURL }}"
{{- if or (.Get "alt") (.Get "caption") }}
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
alt="{{ with .Get "alt" }}{{ replace . "'" "&#39;" }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
{{- end -}}
/> <!-- Closing img tag -->
{{- if .Get "link" }}</a>{{ end -}}