git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39b57ed
)
nieuws: retain image attributes in overview thumbs
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 8 Nov 2018 02:50:08 +0000
(
03:50
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 8 Nov 2018 02:50:08 +0000
(
03:50
+0100)
nieuws.inc.php
patch
|
blob
|
history
diff --git
a/nieuws.inc.php
b/nieuws.inc.php
index e2985692018e3db8055a5d596082cefd7a2bc307..e5e1ffa3664c764d2a292c8da87be1311baafda9 100644
(file)
--- a/
nieuws.inc.php
+++ b/
nieuws.inc.php
@@
-114,7
+114,9
@@
function shownews($input, $limit = 1000)
$article = new ArchiveArticle($filename);
print '<li>';
if ($article->thumb) {
- printf('<img src="/%s" class="left" />', $article->thumb);
+ $img = preg_replace('{(?<= \b src="/) [^"]* }x', $article->thumb, $article->img);
+ $img = preg_replace('{(?= />$)}', ' class="left"', $img);
+ print $img;
}
print '<article>';
printf(