aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-14 14:27:00 -0800
committerzotlabs <mike@macgirvin.com>2016-12-14 14:27:00 -0800
commit63efbdffe6ef653e1556a7b34ea59b75b234e759 (patch)
treefc73ec12cf75d8c3084c0eb02ac68e289a8161c2 /include/bb2diaspora.php
parenta7af6d8a3cabbf5fc87efe395ed3b5b6c0bfc655 (diff)
downloadvolse-hubzilla-63efbdffe6ef653e1556a7b34ea59b75b234e759.tar.gz
volse-hubzilla-63efbdffe6ef653e1556a7b34ea59b75b234e759.tar.bz2
volse-hubzilla-63efbdffe6ef653e1556a7b34ea59b75b234e759.zip
markdown regex
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('&#x2672;',html_entity_decode('&#x2672;',ENT_QUOTES,'UTF-8'),$s);