diff --git a/include/bbcode.php b/include/bbcode.php
index 0275d9153..7f242fe48 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -3,6 +3,7 @@
use Zotlabs\Lib\Apps;
use Zotlabs\Lib\Libzot;
use Zotlabs\Lib\SvgSanitizer;
+use Michelf\MarkdownExtra;
/**
* @file include/bbcode.php
@@ -1248,17 +1249,15 @@ function bbcode($Text, $options = []) {
// Convert new line chars to html
tags
- // nlbr seems to be hopelessly messed up
- // $Text = nl2br($Text);
-
- // We'll emulate it.
-
$Text = str_replace("\r\n", "\n", $Text);
- $Text = str_replace(array("\r", "\n"), array('
', '
'), $Text);
- if ($preserve_nl)
- $Text = str_replace(array("\n", "\r"), array('', ''), $Text);
+ $Text = MarkdownExtra::DefaultTransform($Text);
+ $Text = str_replace(">\n", '>
', $Text);
+
+ //$Text = str_replace(array("\r", "\n"), array('
', '
'), $Text);
+ // if ($preserve_nl)
+ // $Text = str_replace(array("\n", "\r"), array('', ''), $Text);
$Text = str_replace(array("\t", " "), array(" ", " "), $Text);