diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index d6bff9ab5b..933055b1b3 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -22,6 +22,9 @@ function diaspora2bb($s) { $s = str_replace("\n", " \n", $s); + // Replace lonely stars in lines not starting with it with literal stars + $s = preg_replace('/^([^\*]+)\*([^\*]*)$/im', '$1\*$2', $s); + // The parser cannot handle paragraphs correctly $s = str_replace(array('

', '

', '

'), array('
', '
', '
'), $s);