aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-11 18:54:23 -0700
committerfriendica <info@friendica.com>2012-08-11 18:54:23 -0700
commite80d69d25b816cda36e2c772db2805f2dc744bbe (patch)
tree1b5f9f40061639d41b22591ae29491964934dc05 /include/bb2diaspora.php
parentcac2d408329c8ad0f2f7faed07c4615be12acdf5 (diff)
downloadvolse-hubzilla-e80d69d25b816cda36e2c772db2805f2dc744bbe.tar.gz
volse-hubzilla-e80d69d25b816cda36e2c772db2805f2dc744bbe.tar.bz2
volse-hubzilla-e80d69d25b816cda36e2c772db2805f2dc744bbe.zip
merge upstream
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 9ede42f6c..b0e12027a 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -196,6 +196,14 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
// The bbcode parser now handles youtube-links (and the other stuff) correctly.
// Additionally the html code is now fixed so that lists are now working.
+ /**
+ * Transform #tags, strip off the [url] and replace spaces with underscore
+ */
+ $Text = preg_replace_callback('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', create_function('$match',
+ 'return \'#\'. str_replace(\' \', \'_\', $match[2]);'
+ ), $Text);
+
+
// Converting images with size parameters to simple images. Markdown doesn't know it.
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $Text);