aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-05 18:34:30 -0700
committerFriendika <info@friendika.com>2011-09-05 18:34:30 -0700
commite921b97a7f4e6f16e499eb7a8dd496f88d18277a (patch)
tree2b2b7a0e394604364ff5102a5945a798a7b6158e /include/bb2diaspora.php
parent7e8100d2cd27227435ba6ff421dd3c3d8689930f (diff)
downloadvolse-hubzilla-e921b97a7f4e6f16e499eb7a8dd496f88d18277a.tar.gz
volse-hubzilla-e921b97a7f4e6f16e499eb7a8dd496f88d18277a.tar.bz2
volse-hubzilla-e921b97a7f4e6f16e499eb7a8dd496f88d18277a.zip
bug #127, add Diaspora notes to Connect (dfrn_request) page, get rid of security warnings
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index ca0c961b3..591aaf7fa 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -8,6 +8,10 @@ require_once('include/event.php');
function diaspora2bb($s) {
+ // bug #127
+ $s = preg_replace('/\[(.+?)\]\((.+?)[^\\\]_(.+?)\)/','[$1]($2\\_$3)',$s);
+
+
$s = str_replace(array('\\**','\\__','\\*','\\_'), array('-^doublestar^-','-^doublescore-^','-^star^-','-^score^-'),$s);
$s = preg_replace("/\*\*\*(.+?)\*\*\*/", '[b][i]$1[/i][/b]', $s);
$s = preg_replace("/\_\_\_(.+?)\_\_\_/", '[b][i]$1[/i][/b]', $s);
@@ -15,6 +19,7 @@ function diaspora2bb($s) {
$s = preg_replace("/\_\_(.+?)\_\_/", '[b]$1[/b]', $s);
$s = preg_replace("/\*(.+?)\*/", '[i]$1[/i]', $s);
$s = preg_replace("/\_(.+?)\_/", '[i]$1[/i]', $s);
+
$s = str_replace(array('-^doublestar^-','-^doublescore-^','-^star^-','-^score^-'), array('**','__','*','_'), $s);
$s = preg_replace('/\!\[(.+?)\]\((.+?)\)/','[img]$2[/img]',$s);
$s = preg_replace('/\[(.+?)\]\((.+?)\)/','[url=$2]$1[/url]',$s);