From 872145d1c2aec709770de10579d2a4f83c601f37 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Fri, 1 Sep 2023 09:27:03 +0200
Subject: [PATCH] Fix not being able to invoke phrase search using unicode
 quotation marks (#26687)

---
 app/services/search_service.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/services/search_service.rb b/app/services/search_service.rb
index 40d82fc52..9a40d7bdd 100644
--- a/app/services/search_service.rb
+++ b/app/services/search_service.rb
@@ -1,8 +1,10 @@
 # frozen_string_literal: true
 
 class SearchService < BaseService
+  QUOTE_EQUIVALENT_CHARACTERS = /[“”„«»「」『』《》]/
+
   def call(query, account, limit, options = {})
-    @query     = query&.strip
+    @query     = query&.strip&.gsub(QUOTE_EQUIVALENT_CHARACTERS, '"')
     @account   = account
     @options   = options
     @limit     = limit.to_i