From: Mischa POSLAWSKY Date: Wed, 21 Nov 2018 08:45:00 +0000 (+0100) Subject: nieuws: replies in html files X-Git-Tag: v3.8~5 X-Git-Url: http://git.shiar.nl/minimedit.git/commitdiff_plain/e1e87f32c6654f1e4bf07d4d4b92926d5b90d085 nieuws: replies in html files Same results using comment form, but manually allows for rich contents. --- 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 '