]> git.mxchange.org Git - friendica.git/commitdiff
Issue 12863: Convert Hubzilla mentions to Friendica mentions
authorMichael <heluecht@pirati.ca>
Sat, 18 Mar 2023 07:59:47 +0000 (07:59 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 18 Mar 2023 07:59:47 +0000 (07:59 +0000)
src/Protocol/ActivityPub/Processor.php

index 4572bdaa60b95d65dcdfaa5d2614b55204e8d184..e740fcb17a5449525b232cfdf8e0dbd3e95ef9a9 100644 (file)
@@ -93,7 +93,9 @@ class Processor
         */
        public static function normalizeMentionLinks(string $body): string
        {
-               return preg_replace('%\[url=([^\[\]]*)]([#@!])(.*?)\[/url]%ism', '$2[url=$1]$3[/url]', $body);
+               $body = preg_replace('%\[url=([^\[\]]*)]([#@!])(.*?)\[/url]%ism', '$2[url=$1]$3[/url]', $body);
+               $body = preg_replace('%([#@!])\[zrl=([^\[\]]*)](.*?)\[/zrl]%ism', '$1[url=$2]$3[/url]', $body);
+               return $body;
        }
 
        /**