From e1e87f32c6654f1e4bf07d4d4b92926d5b90d085 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 21 Nov 2018 09:45:00 +0100 Subject: [PATCH] nieuws: replies in html files Same results using comment form, but manually allows for rich contents. --- nieuws/replies.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nieuws/replies.php b/nieuws/replies.php index b6285b1..a6d9740 100644 --- a/nieuws/replies.php +++ b/nieuws/replies.php @@ -7,8 +7,9 @@ $pagelink = $Page.$Args; if ($_POST) { try { @mkdir($pagelink); - $target = $pagelink.'/'.date('YmdHis').':'.$User['name'].'.txt'; - $written = file_put_contents($target, $_POST['reply']); + $target = $pagelink.'/'.date('YmdHis').':'.$User['name'].'.html'; + $html = nl2br(htmlspecialchars($_POST['reply'])); + $written = file_put_contents($target, $html); if ($written === FALSE) { throw new Exception('Fout bij opslaan'); } @@ -21,8 +22,8 @@ if ($_POST) { print '