about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2025-08-25 19:25:28 +0300
committerGitHub <noreply@github.com>2025-08-25 19:25:28 +0300
commit7771b56a4333aa75fced8a7c05fa5458bb1f2ef5 (patch)
tree61ce0be7c5906a1e53dd0f8e6631e73fda1547bb /src
parent3810b29fb6f6bf217da93e3510d9ebad851f7f11 (diff)
downloadvoidsky-7771b56a4333aa75fced8a7c05fa5458bb1f2ef5.tar.zst
fix searching for phrases by replacing smart quotes (#8865)
Diffstat (limited to 'src')
-rw-r--r--src/lib/strings/helpers.ts4
1 files changed, 4 insertions, 0 deletions
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