1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-13 17:12:07 +02:00

Fixes #3270 - Download meta description limit and formatting

This commit is contained in:
Tijn Kuyper 2019-10-29 15:33:54 +01:00
parent 389f08d216
commit 46f01e17bf
No known key found for this signature in database
GPG Key ID: AAEA3CC2C5A308F2

View File

@ -377,6 +377,8 @@ 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 = $tp->text_truncate($metaDescription, 290); // + '...'
e107::meta('description', $tp->toText($metaDescription));
e107::meta('keywords', $row['download_keywords']);