From e9296a3b978b9082c9d2e512fbd6e0b5f4a7daa1 Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Wed, 27 Nov 2024 14:05:46 +0000 Subject: [PATCH] [5.2] mod articles (#44475) --- modules/mod_articles/src/Helper/ArticlesHelper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/mod_articles/src/Helper/ArticlesHelper.php b/modules/mod_articles/src/Helper/ArticlesHelper.php index fa2366f47b08e..4f551cffaeb74 100644 --- a/modules/mod_articles/src/Helper/ArticlesHelper.php +++ b/modules/mod_articles/src/Helper/ArticlesHelper.php @@ -383,7 +383,8 @@ public function getArticles(Registry $params, SiteApplication $app) // Remove any images belongs to the text if (!$params->get('image')) { - $item->displayIntrotext = preg_replace('/]*>/', '', $item->displayIntrotext); + // Remove any images and empty links from the intro text + $item->displayIntrotext = preg_replace(['/\\]*>/', '/]*><\\/a>/'], '', $item->displayIntrotext); } if ($introtext_limit != 0) {