From cca85f997bb1cbd3cb1f3a1d0253510b42f34ffa Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Sun, 14 Mar 2021 10:55:32 -0500 Subject: [PATCH] Fix broken tag URLs for tags with dashes in them --- www/ebooks/index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/ebooks/index.php b/www/ebooks/index.php index d6d304e4..a6c2f499 100644 --- a/www/ebooks/index.php +++ b/www/ebooks/index.php @@ -49,6 +49,11 @@ try{ $tags = []; } + // Replace dashes passed in from URLs like /tags/science-fiction + foreach($tags as $key => $tag){ + $tags[$key] = str_replace('-', ' ', $tag); + } + // Are we looking at a collection? if($collection !== null){ $ebooks = Library::GetEbooksByCollection($collection);