Fix not being able to invoke phrase search using unicode quotation marks (#26687)

lolsob-rspec
Eugen Rochko 2023-09-01 09:27:03 +02:00 committed by GitHub
parent a189771256
commit 340e86a137
1 changed files with 3 additions and 1 deletions

View File

@ -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