diff --git a/assets/ts/gallery.ts b/assets/ts/gallery.ts index 730139b..ec7c02d 100644 --- a/assets/ts/gallery.ts +++ b/assets/ts/gallery.ts @@ -77,7 +77,7 @@ class StackGallery { if (!isNewLineImage) continue; const hasLink = img.parentElement.tagName == 'A'; - + let el: HTMLElement = img; /// Wrap image with figure tag, with flex-grow and flex-basis values extracted from img's data attributes const figure = document.createElement('figure'); @@ -93,7 +93,7 @@ class StackGallery { /// Add figcaption if it exists if (img.hasAttribute('alt')) { const figcaption = document.createElement('figcaption'); - figcaption.innerHTML = img.getAttribute('data-alt-html'); + figcaption.innerText = img.getAttribute('alt'); figure.appendChild(figcaption); } diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index ceda1ed..0ed5584 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -32,9 +32,7 @@ loading="lazy" {{ with $alt }} alt="{{ . }}" - data-alt-html="{{ . | markdownify }}" {{ end }} - {{ if $galleryImage }} class="gallery-image" data-flex-grow="{{ div (mul $image.Width 100) $image.Height }}"