From 9c432db209027834f8d231a1f6c502366531fb06 Mon Sep 17 00:00:00 2001 From: ro Date: Tue, 29 Oct 2024 12:05:50 -0600 Subject: [PATCH] fix for link encoding issue small bug where links in the archive and tag templates where being rendered as url encoded strings, so that needed to be decoded so it displays as normal text --- app/Services/Data/SortingService.php | 2 +- content/themes/fipamo-default-v2/archive.blade.php | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/Services/Data/SortingService.php b/app/Services/Data/SortingService.php index fd701e3..aab8ba3 100644 --- a/app/Services/Data/SortingService.php +++ b/app/Services/Data/SortingService.php @@ -90,7 +90,7 @@ class SortingService if (isset($page['tags'])) { if (strpos($page['tags'], $tag) !== false) { array_push($tagged, [ - 'title' => $page['title'], + 'title' => urldecode($page['title']), 'slug' => $page['slug'], 'path' => $page['path'], 'feature' => $page['feature'], diff --git a/content/themes/fipamo-default-v2/archive.blade.php b/content/themes/fipamo-default-v2/archive.blade.php index 3892a6f..b5ba280 100644 --- a/content/themes/fipamo-default-v2/archive.blade.php +++ b/content/themes/fipamo-default-v2/archive.blade.php @@ -14,14 +14,17 @@

{{ $data['full_month'] }}

@foreach($data['pages'] as $page) + @php + $title = urldecode($page['title']); + @endphp @if(isset($dynamicRender)) @if($dynamicRender == 'true') - {{ $page['title'] }}
+ {{ $title }}
@else - {{ $page['title'] }}
+ {{ $title }}
@endif @else - {{ $page['title'] }}
+ {{ $title }}
@endif @endforeach