From: Mischa POSLAWSKY Date: Thu, 8 Nov 2018 02:50:08 +0000 (+0100) Subject: nieuws: retain image attributes in overview thumbs X-Git-Tag: v3.8~10 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/2e685fd177e593fd2e648fe85863854e6834aabb nieuws: retain image attributes in overview thumbs --- 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(