diff --git a/config/filters/general.js b/config/filters/general.js index 0cd92f53..97bd9651 100644 --- a/config/filters/general.js +++ b/config/filters/general.js @@ -8,6 +8,7 @@ export default { const replacement = '&' return string.replace(pattern, replacement) }, + replaceQuotes: (string) => string.replace(/"/g, '"'), formatNumber: (number) => number.toLocaleString('en-US'), htmlTruncate: (content, limit = 50) => truncateHtml(content, limit, { byWords: true, diff --git a/src/includes/base.liquid b/src/includes/base.liquid index ed110d8f..71557765 100644 --- a/src/includes/base.liquid +++ b/src/includes/base.liquid @@ -92,17 +92,17 @@ - {{ pageTitle }} + {{ pageTitle }} - - - + + + - - + + @@ -119,36 +119,6 @@ - diff --git a/src/includes/partials/blocks/hero.liquid b/src/includes/partials/blocks/hero.liquid index 7627ac04..19fb82b3 100644 --- a/src/includes/partials/blocks/hero.liquid +++ b/src/includes/partials/blocks/hero.liquid @@ -8,7 +8,7 @@ (max-width: 850px) 512px 1024px" src="{{ globals.cdn_url }}{{ image }}?class=bannersm&type=webp" - alt="{{ alt }}" + alt="{{ alt | replaceQuotes }}" class="image-banner" loading="lazy" decoding="async" diff --git a/src/includes/partials/media/grid.liquid b/src/includes/partials/media/grid.liquid index 96318221..5e51b6d5 100644 --- a/src/includes/partials/media/grid.liquid +++ b/src/includes/partials/media/grid.liquid @@ -2,7 +2,7 @@ {%- assign hidePagination = pageCount <= 1 -%}
{%- for item in data limit: count -%} - {%- assign alt = item.grid.alt | strip | escape -%} + {%- assign alt = item.grid.alt | replaceQuotes -%}
diff --git a/src/includes/partials/media/music/recent.liquid b/src/includes/partials/media/music/recent.liquid index 3a180565..4ff1a8eb 100644 --- a/src/includes/partials/media/music/recent.liquid +++ b/src/includes/partials/media/music/recent.liquid @@ -10,7 +10,7 @@ " sizes="(max-width: 450px) 50px, 100px" src="{{ globals.cdn_url }}{{ item.chart.image }}?class=w50&type=webp" - alt="{{ item.chart.alt }}" + alt="{{ item.chart.alt | replaceQuotes }}" loading="lazy" decoding="async" width="64" diff --git a/src/pages/dynamic/books/book.html b/src/pages/dynamic/books/book.html index d8eb5036..7d67eb8f 100644 --- a/src/pages/dynamic/books/book.html +++ b/src/pages/dynamic/books/book.html @@ -24,7 +24,7 @@ schema: book (max-width: 1000px) 812px, 812px" src="{{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp" - alt="{{ alt }}" + alt="{{ alt | replaceQuotes }}" loading="lazy" decoding="async" width="200" diff --git a/src/pages/dynamic/books/index.html b/src/pages/dynamic/books/index.html index cdf643c3..2580e4f4 100644 --- a/src/pages/dynamic/books/index.html +++ b/src/pages/dynamic/books/index.html @@ -26,7 +26,7 @@ schema: books sizes="(max-width: 450px) 200px, 400px" src="{{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp" - alt="{{ alt }}" + alt="{{ alt | replaceQuotes }}" loading="lazy" decoding="async" width="200" diff --git a/src/pages/dynamic/music/artists/artist.html b/src/pages/dynamic/music/artists/artist.html index 2a8187fc..450e7f6f 100644 --- a/src/pages/dynamic/music/artists/artist.html +++ b/src/pages/dynamic/music/artists/artist.html @@ -32,7 +32,7 @@ schema: artist (max-width: 850px) 400px, 800px" src="{{ globals.cdn_url }}{{ artist.image }}?class=w200&type=webp" - alt="{{ alt }}" + alt="{{ alt | replaceQuotes }}" loading="eager" decoding="async" width="200" diff --git a/src/pages/dynamic/posts/post.html b/src/pages/dynamic/posts/post.html index e7ea7b9b..141db300 100644 --- a/src/pages/dynamic/posts/post.html +++ b/src/pages/dynamic/posts/post.html @@ -32,7 +32,7 @@ schema: blog (max-width: 1000px) 800px, 1200px" src="{{ globals.cdn_url }}{{ post.image }}?class=w200" - alt="{{ post.image_alt }}" + alt="{{ post.image_alt | replaceQuotes }}" class="image-banner" loading="eager" decoding="async" diff --git a/src/pages/dynamic/watching/movie.html b/src/pages/dynamic/watching/movie.html index 9e0b820d..9e3573de 100644 --- a/src/pages/dynamic/watching/movie.html +++ b/src/pages/dynamic/watching/movie.html @@ -22,7 +22,7 @@ schema: movie (max-width: 850px) 512px, 1024px" src="{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannersm&type=webp" - alt="{{ alt }}" + alt="{{ alt | replaceQuotes }}" class="image-banner" loading="eager" decoding="async" diff --git a/src/pages/dynamic/watching/show.html b/src/pages/dynamic/watching/show.html index 47ca8adc..06a3e751 100644 --- a/src/pages/dynamic/watching/show.html +++ b/src/pages/dynamic/watching/show.html @@ -22,7 +22,7 @@ schema: show (max-width: 850px) 512px, 1024px" src="{{ globals.cdn_url }}{{ show.backdrop }}?class=bannersm&type=webp" - alt="{{ alt }}" + alt="{{ alt | replaceQuotes }}" class="image-banner" loading="eager" decoding="async"