Skip to content

Quotes in search result (using cmdk) crashes the application #18276

@yeskunall

Description

@yeskunall

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

If a result to your search query (not the query itself, as reported in #16506) contains quotes (don’t think it matters if it’s single or double), then the app crashes. The screencast shows the DOMException that causes the app to crash, but I have also provided additional context below.

To Reproduce

See the screencast below:

CleanShot.2023-10-17.at.13.41.49.mp4

Expected behavior

I should be able to hover over the result and click on it.

Screenshots

N/A

System information

  • OS: N/A
  • Browser: Brave
  • Version of supabase-js: N/A
  • Version of Node.js: N/A

Additional context

I reported the error on dip/cmdk#189 because I believe the issue exists in the library itself, but because it is causing the app to crash, I thought it would be useful to report it here as well. I know you guys use a forked version of cmdk, so maybe the fix can be applied to the forked version directly. LMK if you need more info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions