From 2c2db7de0a55fe4dc2afe31ac4a80073c81ab932 Mon Sep 17 00:00:00 2001
From: BodgeMaster <>
Date: Thu, 2 Sep 2021 05:09:32 +0200
Subject: [PATCH] fixed #37 as a temporary solution until we have a markdown
converter
---
threadr/board/board.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/threadr/board/board.php b/threadr/board/board.php
index dee5fbc..e575213 100644
--- a/threadr/board/board.php
+++ b/threadr/board/board.php
@@ -13,6 +13,10 @@ foreach($statement->fetchAll() as $ROW) {
$post_time = htmlspecialchars($ROW['post_time']);
$post_content = htmlspecialchars($ROW['content']);
+ // add line breaks to post content, to be replaced with proper makrdown support in the future (see #44)
+ $newlines = array("\r\n", "\n\r", "\r", "\n") // two-character newlines first to prevent placing two line breaks instead of one
+ str_replace($newlines, "
", $post_content);
+
echo "