From 4384fa8b12331b369b313efb938a23b8bde34e61 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 9 Sep 2014 01:14:15 -0700 Subject: d* friending vsprintf error --- include/bb2diaspora.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/bb2diaspora.php') 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 -- cgit v1.2.3