nieuws: fix relative image paths in toc
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 6 Dec 2020 08:18:16 +0000 (09:18 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 19 Dec 2020 02:01:43 +0000 (03:01 +0100)
Current path does not apply with trailing /.

widget/nieuws.php

index 73258b2a31c53024f2693d0b5d7cc1cb5531b77b..dd019a3be60abcfee2dd1ade4375646edfc09f0d 100644 (file)
@@ -44,7 +44,7 @@ function printtoc($input, $class = FALSE)
                $html .= sprintf(' <small class="date">%s</small>', showdate($dateparts));
                if ($class == 'gallery' and $article->img) {
                        $html = "<div>$html</div>";
-                       $html = sprintf('<img src="%s" />', $article->thumb(200)) . $html;
+                       $html = sprintf('<img src="/%s" />', $article->thumb(200)) . $html;
                }
                $html = sprintf('<a href="/%s">%s</a>', $article->link, $html);
                print "<li><article>$html</article></li>\n";