Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot search with special symbols like "@" #93

Closed
outloudvi opened this issue Nov 21, 2024 · 0 comments · Fixed by #94
Closed

Cannot search with special symbols like "@" #93

outloudvi opened this issue Nov 21, 2024 · 0 comments · Fixed by #94

Comments

@outloudvi
Copy link
Contributor

Describe the bug
Cannot search strings with @ in it.

To Reproduce
Steps to reproduce the behavior:

  1. Click the search button
  2. Input IDOLM@STER

Expected behavior
The search should complete and not crash.

Screenshots
Search request failed: query_str=IDOLM@STER, n=30 (fts5: syntax error near "@")

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Firefox (Is that needed?)
  • Version: 134.0a1 (Nightly 2024-11-19)

Additional context
The Rust error body:

Error {
    context: "Processing signal: SearchForRequest",
    source: Error {
        context: "Search request failed: query_str=IDOLM@STER, n=30",
        source: Query(
            SqlxError(
                Database(
                    SqliteError {
                        code: 1,
                        message: "fts5: syntax error near \"@\"",
                    },
                ),
            ),
        ),
    },
}

As of SQLite FTS5, the string might be safer to be quoted. I guess this is also somehow related to #91.

Wrapping it with " seems to solve that:

Wrapping the search query with " solves the runtime error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant