Diaspora: Better handling of "red"-links
This commit is contained in:
parent
0f16672176
commit
35fbe3be14
2 changed files with 18 additions and 6 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue