Skip to content

Commit

Permalink
Normalize query string
Browse files Browse the repository at this point in the history
  • Loading branch information
pasela committed Oct 18, 2018
1 parent bcf3d21 commit 1d924f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions history/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
_ "github.com/mattn/go-sqlite3"
"github.com/pasela/alfred-chrome-history/profile"
"github.com/pasela/alfred-chrome-history/utils"
"golang.org/x/text/unicode/norm"
)

const (
Expand Down Expand Up @@ -64,8 +65,8 @@ func (h *History) Close() error {
}

func (h *History) Query(url, title string, limit int) ([]Entry, error) {
u := buildLikeValue(url)
t := buildLikeValue(title)
u := buildLikeValue(norm.NFC.String(url))
t := buildLikeValue(norm.NFC.String(title))

sql := `
SELECT
Expand Down

0 comments on commit 1d924f4

Please sign in to comment.