aboutsummaryrefslogtreecommitdiff
path: root/timeline.inc.php
diff options
context:
space:
mode:
authorjaquer <jaquer@users.noreply.github.com>2022-01-26 16:16:55 -0800
committerjaquer <jaquer@users.noreply.github.com>2022-01-26 16:16:55 -0800
commit594ba3c4c945557182ac946d6c293cb388620dfe (patch)
treeef3d4a85b9b0189dead52fd593289130fcb15396 /timeline.inc.php
parent5922ced6820ea7349f627c9de83859c3fa340a4c (diff)
downloadmicroblog-594ba3c4c945557182ac946d6c293cb388620dfe.tar.gz
microblog-594ba3c4c945557182ac946d6c293cb388620dfe.tar.bz2
microblog-594ba3c4c945557182ac946d6c293cb388620dfe.zip
Call nl2br() when showing post content to maintain line breaks.
Diffstat (limited to 'timeline.inc.php')
-rw-r--r--timeline.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/timeline.inc.php b/timeline.inc.php
index 13a4d54..f560d24 100644
--- a/timeline.inc.php
+++ b/timeline.inc.php
@@ -42,7 +42,7 @@
$formatted_time = strftime('%b %d %Y %H:%M', $post['post_timestamp']);
?>
<a class="post-timestamp" href="<?= $config['url'] ?>/<?= $post['id'] ?>"><time datetime="<?= $datetime ?>" data-unix-time="<?= $post['post_timestamp'] ?>"><?= $formatted_time ?></time></a>
- <p class="post-message"><?= autolink($post['post_content']) ?></p>
+ <p class="post-message"><?= nl2br(autolink($post['post_content'])) ?></p>
</li>
<?php endforeach; ?>
</ul>