1
1
Fork 0

Diaspora: Better handling of "red"-links

This commit is contained in:
Michael Vogel 2014-05-18 18:56:07 +02:00
commit 35fbe3be14
2 changed files with 18 additions and 6 deletions

View file

@ -63,7 +63,8 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
/**
* Transform #tags, strip off the [url] and replace spaces with underscore
*/
$Text = preg_replace_callback('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', create_function('$match',
$URLSearchString = "^\[\]";
$Text = preg_replace_callback("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/i", create_function('$match',
'return \'#\'. str_replace(\' \', \'_\', $match[2]);'
), $Text);