From 7771b56a4333aa75fced8a7c05fa5458bb1f2ef5 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 25 Aug 2025 19:25:28 +0300 Subject: fix searching for phrases by replacing smart quotes (#8865) --- src/lib/strings/helpers.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib/strings/helpers.ts') diff --git a/src/lib/strings/helpers.ts b/src/lib/strings/helpers.ts index ca77c4666..61ad4e85b 100644 --- a/src/lib/strings/helpers.ts +++ b/src/lib/strings/helpers.ts @@ -84,6 +84,10 @@ export function augmentSearchQuery(query: string, {did}: {did?: string}) { return query } + // replace “smart quotes” with normal ones + // iOS keyboard will add fancy unicode quotes, but only normal ones work + query = query.replaceAll(/[“”]/g, '"') + // We don't want to replace substrings that are being "quoted" because those // are exact string matches, so what we'll do here is to split them apart -- cgit 1.4.1