~cytrogen/masto-fe

872145d1c2aec709770de10579d2a4f83c601f37 — Eugen Rochko 2 years ago 0008458
Fix not being able to invoke phrase search using unicode quotation marks (#26687)

1 files changed, 3 insertions(+), 1 deletions(-)

M app/services/search_service.rb
M app/services/search_service.rb => app/services/search_service.rb +3 -1
@@ 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