From dcfc97617cdb6307e14752d7fb10f00733737616 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 17 May 2020 05:50:17 +0200 Subject: [PATCH] sitemap: strip images from teaser Fix duplicate display of early images. --- widget/linkref.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/widget/linkref.php b/widget/linkref.php index 1ac3886..75135f8 100644 --- a/widget/linkref.php +++ b/widget/linkref.php @@ -5,7 +5,9 @@ printf("\n\t".'', $article->thumb('100x100')); } if ($article->teaser) { - printf("\n\t
%s
", - preg_replace('/\n(.*)/s', ' \1', $article->teaser) - ); + printf("\n\t
%s
", preg_replace( + ['/\n(.*)/s', '/]*>/'], + [' \1', ''], + $article->teaser + )); } -- 2.30.0