1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 22:57:14 +02:00

#3270 - Download meta description

This commit is contained in:
Tijn Kuyper
2019-10-29 16:58:03 +01:00
parent 46f01e17bf
commit e470f4b786

View File

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