Forráskód Böngészése

fix: escape fts5 match input

Tienson Qin 4 éve
szülő
commit
4040beeadd
1 módosított fájl, 1 hozzáadás és 0 törlés
  1. 1 0
      src/electron/electron/search.cljs

+ 1 - 0
src/electron/electron/search.cljs

@@ -178,6 +178,7 @@
                             (string/replace " or " " OR ")
                             (string/replace " | " " OR ")
                             (string/replace " not " " NOT "))
+            match-input (str "\"" match-input "\"")
             non-match-input (str "%" (string/replace q #"\s+" "%") "%")
             limit  (or limit 20)
             select "select rowid, uuid, content, page from blocks_fts where "