Only detect http links

This commit is contained in:
Michael 2021-05-02 17:53:11 +00:00
parent 77e1ec6df2
commit 0616f5230c

View file

@ -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) {