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

@ -121,7 +121,7 @@ lots of bulk packaged things like sweets, candies and booze. It's gonna be fun t
{{< gallery-photo fn="2024-08-04/IMG_0523.JPG" caption="The baked hamburger buns, golden brown but not crispy -- Marina demands soft buns!" >}}
{{< gallery-photo fn="2024-08-04/IMG_0524.JPG" caption="Closeup of a hamburger bun with sesame seeds, cut in half to show the breadcrum" >}}
{{< gallery-photo fn="2024-08-04/IMG_0525.JPG" caption="My burger with salad, cheese, onions and pickles. It was godly." >}}
{{< gallery-photo fn="2024-08-04/website.png" caption="A screenshot of the work-in-progress IPng.ch website in Hugo. It is looking really good!" >}}
{{< gallery-photo fn="2024-08-04/website.png" caption="A screenshot of the work-in-progress IPng.ch website in Hugo. It's looking really good!" >}}
{{< /gallery-category >}}
{{< gallery-modal >}}

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 -}}