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));