]> git.mxchange.org Git - friendica.git/commitdiff
Added support for internal Diaspora links to accounts
authorMichael <heluecht@pirati.ca>
Sat, 30 Jun 2018 22:37:44 +0000 (22:37 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 30 Jun 2018 22:37:44 +0000 (22:37 +0000)
src/Content/Text/BBCode.php

index 35f4979d11fe7ae943310e0d73b15488356ec857..33b3503eca4ab0e4999a911b3a7a76807eff17f9 100644 (file)
@@ -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";