fixed #37 as a temporary solution until we have a markdown converter
parent
1da694b492
commit
2c2db7de0a
|
@ -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, "<br />", $post_content);
|
||||
|
||||
echo "<section>
|
||||
<h1>$post_title</h1>
|
||||
<article>
|
||||
|
|
Loading…
Reference in New Issue