From 95515584100b48d5736dbded0149824fc791261f Mon Sep 17 00:00:00 2001 From: James Smith Date: Mon, 27 Jan 2025 13:20:48 +0000 Subject: [PATCH] improve regex --- app/controllers/models_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/models_controller.rb b/app/controllers/models_controller.rb index 694f2c06e..f338aba59 100644 --- a/app/controllers/models_controller.rb +++ b/app/controllers/models_controller.rb @@ -174,7 +174,7 @@ def destroy private def redirect_search - redirect_to new_follow_path(uri: params[:q]) if params[:q]&.match?(/(@|acct:)?(?[a-z0-9\-_.]+)(?:@(?.*))/) + redirect_to new_follow_path(uri: params[:q]) if params[:q]&.match?(/(@|acct:)?([a-z0-9\-_.]+)@(.*)/) end def generate_available_tag_list