From 2e685fd177e593fd2e648fe85863854e6834aabb Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 8 Nov 2018 03:50:08 +0100 Subject: [PATCH] nieuws: retain image attributes in overview thumbs --- nieuws.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nieuws.inc.php b/nieuws.inc.php index e298569..e5e1ffa 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -114,7 +114,9 @@ function shownews($input, $limit = 1000) $article = new ArchiveArticle($filename); print '
  • '; if ($article->thumb) { - printf('', $article->thumb); + $img = preg_replace('{(?<= \b src="/) [^"]* }x', $article->thumb, $article->img); + $img = preg_replace('{(?= />$)}', ' class="left"', $img); + print $img; } print '
    '; printf( -- 2.30.0