mirror of
https://github.com/friendica/friendica
synced 2024-11-10 06:22:53 +00:00
fix D* links+text smushed together
This commit is contained in:
parent
dcc22ab5c5
commit
c5f41d8b6c
1 changed files with 5 additions and 0 deletions
|
@ -19,6 +19,11 @@ function diaspora2bb($s) {
|
|||
$s = Markdown($s);
|
||||
$s = html2bbcode($s);
|
||||
// $s = str_replace('*','*',$s);
|
||||
|
||||
// we seem to get a lot of text smushed together with links from Diaspora.
|
||||
// if it's a url that we haven't already parsed into a bbcode structure, put a space before it.
|
||||
$s = preg_replace("/([^=])(https?:\/\/)/ism",'$1 $2',$s);
|
||||
|
||||
$s = preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[youtube]$2[/youtube]',$s);
|
||||
$s = preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[youtube]$1[/youtube]',$s);
|
||||
$s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s);
|
||||
|
|
Loading…
Reference in a new issue