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:
867f49e
)
sitemap: strip images from teaser
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 17 May 2020 03:50:17 +0000
(
05:50
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 5 Dec 2020 00:38:53 +0000
(
01:38
+0100)
Fix duplicate display of early images.
widget/linkref.php
patch
|
blob
|
history
diff --git
a/widget/linkref.php
b/widget/linkref.php
index 1ac38864e15874727104fed296f9e1056ca33067..75135f85c1d23d00d4f71a51fd74d1a88f020159 100644
(file)
--- a/
widget/linkref.php
+++ b/
widget/linkref.php
@@
-5,7
+5,9
@@
printf("\n\t".'<img class="right" src="/%s" />', $article->thumb('100x100'));
}
if ($article->teaser) {
- printf("\n\t<blockquote>%s</blockquote>",
- preg_replace('/\n(.*)/s', ' <small>\1</small>', $article->teaser)
- );
+ printf("\n\t<blockquote>%s</blockquote>", preg_replace(
+ ['/\n(.*)/s', '/<img[^>]*>/'],
+ [' <small>\1</small>', ''],
+ $article->teaser
+ ));
}