]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/PageInfo.php
Issue 9657: Check the age of an item
[friendica.git] / src / Content / PageInfo.php
index 39bd35f73af68511db77c60a441c2005305247ce..5396bc1bbe96d4d17a3eb55e6d40bf0918b62b76 100644 (file)
@@ -265,7 +265,7 @@ class PageInfo
                }
 
                if (!$matches && $searchNakedUrls) {
-                       preg_match('~(?<=\W|^)(?<![=\]])(https?://.+)$~is', $body, $matches);
+                       preg_match(Strings::autoLinkRegEx(), $body, $matches);
                        if ($matches && !Strings::endsWith($body, $matches[1])) {
                                unset($matches);
                        }
@@ -292,7 +292,7 @@ class PageInfo
                        $quotedUrl
                )$#isx", function ($match) use ($url) {
                        // Stripping URLs with no label
-                       if (!isset($match[1])) {
+                       if (empty($match[1])) {
                                return '';
                        }