]> git.mxchange.org Git - friendica.git/commitdiff
Improve URL detection in searches
authorMichael <heluecht@pirati.ca>
Fri, 27 Dec 2024 13:08:09 +0000 (13:08 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 27 Dec 2024 13:08:09 +0000 (13:08 +0000)
src/Module/Search/Index.php

index a42f9ddaff5c5f151450c9f0c3062c27479563e4..122b6c569b8937fcbb9e067fea65d964aa57c3e1 100644 (file)
@@ -273,7 +273,7 @@ class Index extends BaseSearch
         */
        private static function tryRedirectToPost(string $search)
        {
-               if (parse_url($search, PHP_URL_SCHEME) == '') {
+               if (!parse_url($search, PHP_URL_SCHEME) && !preg_match('=^[a-z]+://=', $search)) {
                        return;
                }