From: ThibG Date: Sun, 8 Mar 2020 14:42:20 +0000 (+0100) Subject: Fix error when searching for URLs that contain the mention syntax (#13151) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=6185bff4b3c2fec7b84aee8a9d6747d42ad865c0;p=mastodon.git Fix error when searching for URLs that contain the mention syntax (#13151) Fixes #13150 --- diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb index d217dabb3..493813aab 100644 --- a/app/services/account_search_service.rb +++ b/app/services/account_search_service.rb @@ -171,7 +171,7 @@ class AccountSearchService < BaseService end def username_complete? - query.include?('@') && "@#{query}" =~ Account::MENTION_RE + query.include?('@') && "@#{query}" =~ /\A#{Account::MENTION_RE}\Z/ end def likely_acct?