issue/activity: contents after paragraph cut v5.3
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 20 May 2021 23:04:05 +0000 (01:04 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Fri, 21 May 2021 12:07:23 +0000 (14:07 +0200)
Trailing newline added by recent formatting.
Also validate html by keeping element close.

widget/issue/activity.php

index df872ae621f7eb73b75764932a8017295bd12d86..9ce6d530ab403163a66939582e7bfd43941808db 100644 (file)
@@ -12,7 +12,7 @@ $rows = $query->fetchall();
 
 $msgformat = [
        '{(.*)(<p><img [^>]+></p>)\s*}s' => "$2$1",
-       "{(?=</p>\n).+}s" => ' <small class="footer">(Meer op de site)</small>',
+       "{(</p>\n).{20,}}s" => ' <small class="footer">(Meer op de site)</small>$1',
        '{(?<=<img src=")(?:/thumb/[^/]+)?(?=/)}' => '/thumb/300x',
 ];