aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index ffb157b2f..87a8551ae 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -130,6 +130,9 @@ function markdown_to_bb($s, $use_zrl = false) {
$s = html_entity_decode($s,ENT_COMPAT,'UTF-8');
+ // if empty link text replace with the url
+ $s = preg_replace("/\[\]\((.*?)\)/ism",'[$1]($1)',$s);
+
// first try plustags
$s = preg_replace_callback('/\@\{(.+?)\; (.+?)\@(.+?)\}\+/','diaspora_mention_callback',$s);
@@ -149,8 +152,6 @@ function markdown_to_bb($s, $use_zrl = false) {
$s = html2bbcode($s);
- $s = preg_replace("/\[([uz])rl=(.*?)\]\[\[uz]rl\]/ism",'[$1rl=$2]$2[/$1rl]',$s);
-
// protect the recycle symbol from turning into a tag, but without unescaping angles and naked ampersands
$s = str_replace('♲',html_entity_decode('♲',ENT_QUOTES,'UTF-8'),$s);