From: Michael Date: Sat, 30 Jun 2018 22:37:44 +0000 (+0000) Subject: Added support for internal Diaspora links to accounts X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1905242a16d4a2d61d20c18746581616fed779a0;p=friendica.git Added support for internal Diaspora links to accounts --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 35f4979d11..33b3503eca 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1380,6 +1380,13 @@ class BBCode extends BaseObject }, $text ); + $text = preg_replace_callback( + "&\[url=/people\?q\=(.*)\](.*)\[\/url\]&Usi", + function ($match) { + return "[url=" . System::baseUrl() . "/search?search=%40" . $match[1] . "]" . $match[2] . "[/url]"; + }, $text + ); + // Server independent link to posts and comments // See issue: https://github.com/diaspora/diaspora_federation/issues/75 $expression = "=diaspora://.*?/post/([0-9A-Za-z\-_@.:]{15,254}[0-9A-Za-z])=ism";