From: Michael Date: Sun, 2 May 2021 17:53:11 +0000 (+0000) Subject: Only detect http links X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0616f5230caa9e5c8b7c1fcd9552dcae1c5882ab;p=friendica.git Only detect http links --- diff --git a/src/Content/PageInfo.php b/src/Content/PageInfo.php index 21f32cd3c3..d3b38336b5 100644 --- a/src/Content/PageInfo.php +++ b/src/Content/PageInfo.php @@ -257,11 +257,11 @@ class PageInfo $body = preg_replace("/([#@!])\[url\=(.*?)\](.*?)\[\/url\]/ism", '', $body); // Search for pure links - preg_match("/\[url\](.*?)\[\/url\]/ism", $body, $matches); + preg_match("/\[url\](https?:.*?)\[\/url\]/ism", $body, $matches); if (!$matches) { // Search for links with descriptions - preg_match("/\[url\=(.*?)\].*?\[\/url\]/ism", $body, $matches); + preg_match("/\[url\=(https?:.*?)\].*?\[\/url\]/ism", $body, $matches); } if (!$matches && $searchNakedUrls) {