aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 3c4f07568..49dee8759 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -116,6 +116,7 @@ function diaspora_mention_callback($matches) {
function diaspora2bb($s,$use_zrl = false) {
+ $s = str_replace("
","\r",$s);
$s = str_replace("
\n>","",$s);
$s = html_entity_decode($s,ENT_COMPAT,'UTF-8');
@@ -123,11 +124,11 @@ function diaspora2bb($s,$use_zrl = false) {
// Too many new lines. So deactivated the following line
// $s = str_replace("\r","\n",$s);
// Simply remove cr.
- $s = str_replace("\r","",$s);
+// $s = str_replace("\r","",$s);
// <br/> is invalid. Replace it with the valid expression
- $s = str_replace("<br/>","<br />",$s);
- $s = str_replace("\n","<br />",$s);
+// $s = str_replace("<br/>","<br />",$s);
+// $s = str_replace("\n","<br />",$s);
// $s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s);
@@ -147,6 +148,8 @@ function diaspora2bb($s,$use_zrl = false) {
$s = Markdown($s);
+ $s = str_replace("\r","",$s);
+
$s = str_replace('&#35;','#',$s);
// we seem to have double linebreaks
// $s = str_replace("\n",'<br />',$s);
@@ -175,7 +178,6 @@ function diaspora2bb($s,$use_zrl = false) {
// remove duplicate adjacent code tags
$s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s);
-
$s = preg_replace_callback('/\[share(.*?)\]/ism','share_unshield',$s);