Merge pull request #14629 from annando/uri-search

Improve URL detection in searches
This commit is contained in:
Hypolite Petovan 2024-12-27 15:14:19 -05:00 committed by GitHub
commit f29c927b75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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;
}