From efb2b47dc91818578862ad746e7fdabd786a92c0 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 18 Mar 2023 07:59:47 +0000 Subject: [PATCH] Issue 12863: Convert Hubzilla mentions to Friendica mentions --- src/Protocol/ActivityPub/Processor.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 4572bdaa60..e740fcb17a 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -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; } /** -- 2.39.5