nieuws: blockquote containers around replies
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 21 Nov 2018 08:47:21 +0000 (09:47 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 21 Nov 2018 08:49:55 +0000 (09:49 +0100)
Wrap multiple paragraphs and other elements such as lists.

nieuws/replies.php

index a6d9740c444950cafe95fbfef56e3cbb44824b85..61ccc2599dd647bee80b1a11cb4f14e8a90b7aaf 100644 (file)
@@ -9,6 +9,7 @@ if ($_POST) {
                @mkdir($pagelink);
                $target = $pagelink.'/'.date('YmdHis').':'.$User['name'].'.html';
                $html = nl2br(htmlspecialchars($_POST['reply']));
+               $html = "<p>$html</p>\n";
                $written = file_put_contents($target, $html);
                if ($written === FALSE) {
                        throw new Exception('Fout bij opslaan');
@@ -31,7 +32,7 @@ foreach (glob("$pagelink/*.html") as $reply) {
        printf('<strong>%s</strong> <small class=date>%s</small>',
                $replymeta[2], showdate($replydate)
        );
-       printf("<p>%s</p>\n", file_get_contents($reply));
+       printf("<blockquote>%s</blockquote>\n", file_get_contents($reply));
        print "</li>\n";
 }