aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-09 01:14:15 -0700
committerfriendica <info@friendica.com>2014-09-09 01:14:15 -0700
commit4384fa8b12331b369b313efb938a23b8bde34e61 (patch)
tree163f864264f32e086eb2f7b3b046f87eb7b3d5d6 /include/bb2diaspora.php
parent384eace32a0fb0f86880d66500419ebdb2498e31 (diff)
downloadvolse-hubzilla-4384fa8b12331b369b313efb938a23b8bde34e61.tar.gz
volse-hubzilla-4384fa8b12331b369b313efb938a23b8bde34e61.tar.bz2
volse-hubzilla-4384fa8b12331b369b313efb938a23b8bde34e61.zip
d* friending vsprintf error
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 5fb708706..0f91c8bc8 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -91,7 +91,7 @@ function diaspora_mention_callback($matches) {
if(! $link)
$link = 'https://' . $matches[3] . '/u/' . $matches[2];
- return '@[url=' . $link . ']' . trim($matches[1]) . '[/url]';
+ return '@[url=' . $link . ']' . trim($matches[1]) . ((substr($mentions[0],-1,1) === '+') ? '+' : '') . '[/url]' ;
}
@@ -119,6 +119,8 @@ function diaspora2bb($s,$use_zrl = false) {
// $s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s);
+ // first try plustags
+ $s = preg_replace_callback('/\@\{(.+?)\; (.+?)\@(.+?)\}\+/','diaspora_mention_callback',$s);
$s = preg_replace_callback('/\@\{(.+?)\; (.+?)\@(.+?)\}/','diaspora_mention_callback',$s);
// Escaping the hash tags - doesn't always seem to work