mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-10 00:54:27 +02:00
Issue 2999: Better Mastodon handling
This commit is contained in:
parent
352b168e2d
commit
17f15e793f
2 changed files with 20 additions and 1 deletions
|
@ -280,6 +280,10 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
|
|||
|
||||
$URLSearchString = "^\[\]";
|
||||
|
||||
// Fix for Mastodon where the mentions are in a different format
|
||||
$body = preg_replace("/\[url\=([$URLSearchString]*)\]([#!@])(.*?)\[\/url\]/ism",
|
||||
'$2[url=$1]$3[/url]', $body);
|
||||
|
||||
// Adding these spaces is a quick hack due to my problems with regular expressions :)
|
||||
preg_match("/[^!#@]\[url\]([$URLSearchString]*)\[\/url\]/ism", " ".$body, $matches);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue