From e470f4b786e013b6abf8fec66cb5b12aac431305 Mon Sep 17 00:00:00 2001 From: Tijn Kuyper Date: Tue, 29 Oct 2019 16:58:03 +0100 Subject: [PATCH] #3270 - Download meta description --- e107_plugins/download/handlers/download_class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index 111114468..3c56c65ba 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -377,7 +377,7 @@ class download $metaImage = $tp->thumbUrl($row['download_image'], array('w'=>500), null, true); $metaDescription = $tp->toHTML($row['download_description'],true); - $metaDescription = trim(preg_replace('/\s+/', ' ', $metaDescription)); // remove line-breaks + $metaDescription = preg_replace('/\v(?:[\v\h]+)/', '', $metaDescription); // remove all line-breaks and excess whitespace $metaDescription = $tp->text_truncate($metaDescription, 290); // + '...' e107::meta('description', $tp->toText($metaDescription));