From 0982a30c89eb143ad62d46e8c6389da9480da4cf Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 16 Sep 2017 17:22:22 +0000 Subject: [PATCH] Improvement for PR 3705: The detection has to be changed here as well --- include/diaspora.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/diaspora.php b/include/diaspora.php index 8bfba6eff4..af934cc937 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -1013,7 +1013,8 @@ class Diaspora { * @param array $item The item array */ private static function fetch_guid($item) { - preg_replace_callback("=diaspora://.*?/([^\s\]]*)=ism", + $expression = "=diaspora://.*?/post/([0-9A-Za-z\-_@.:]{15,254}[0-9A-Za-z])=ism"; + preg_replace_callback($expression, function ($match) use ($item) { return self::fetch_guid_sub($match, $item); }, $item["body"]);