From e13f0bc1cd7a5d6a594138345f9b20e38074729e Mon Sep 17 00:00:00 2001 From: Tom Udding Date: Sat, 18 Nov 2023 14:40:54 +0100 Subject: [PATCH] Allow basic text style modifiers in activity overview Allows ``, ``, and `` tags as these may be semantically important for the activity. Also applies to the frontpage to prevent excessive usage of modifiers. --- module/Activity/view/activity/activity/list.phtml | 2 +- module/Frontpage/view/frontpage/frontpage/home.phtml | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/module/Activity/view/activity/activity/list.phtml b/module/Activity/view/activity/activity/list.phtml index 4135413ff8..b010bb2c16 100644 --- a/module/Activity/view/activity/activity/list.phtml +++ b/module/Activity/view/activity/activity/list.phtml @@ -44,7 +44,7 @@ use Laminas\View\Renderer\PhpRenderer;
markdown($this->localiseText($activity->getDescription())), - ['

'], + ['

', '', '', ''], ) ?> translate('Continue reading') ?>

diff --git a/module/Frontpage/view/frontpage/frontpage/home.phtml b/module/Frontpage/view/frontpage/frontpage/home.phtml index d0e07f6dc2..4d6f280d79 100644 --- a/module/Frontpage/view/frontpage/frontpage/home.phtml +++ b/module/Frontpage/view/frontpage/frontpage/home.phtml @@ -56,18 +56,21 @@ $lang = $this->plugin('translate')->getTranslator()->getLocale(); getName()->getText($lang); - $content = $item->getDescription()->getText($lang); + $title = $this->localiseText($item->getName()); + $content = strip_tags( + $this->markdown($this->localiseText($item->getDescription())), + ['

', '', '', ''], + ); } else { $title = ($lang === 'en') ? $item->getEnglishTitle() : $item->getDutchTitle(); - $content = ($lang === 'en') ? $item->getEnglishContent() : $item->getDutchContent(); + $content = $this->markdown(($lang === 'en') ? $item->getEnglishContent() : $item->getDutchContent()); } ?>