Improve URL detection in searches

This commit is contained in:
Michael 2024-12-27 13:08:09 +00:00
parent 1b3ba3199e
commit 951999957e

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