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

pull/26749/head
Eugen Rochko 1 year ago committed by GitHub
parent 0008458128
commit 872145d1c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save