ssleptsov / ninja-keys

Keyboard shortcuts interface for your website. Working with static HTML, Vanilla JS, Vue, React, Svelte.
https://ninja-keys-demo.vercel.app/
MIT License
1.65k stars 60 forks source link

Escape search query regex #33

Open tkieft opened 2 years ago

tkieft commented 2 years ago

Specifying a query with a regex special character causes ninja-keys to throw an exception. For example, imagine searching a phone number "+13155550000".

To fix, we escape the search query before constructing the regex.

KonnorRogers commented 9 months ago

It appears this package hasn't had any comments or any releases in ~2 years. I made a fork with quite a few accessibility improvements and other changes noted in the changelog. Adding this to my package as well.

Fixed in my fork here: https://github.com/KonnorRogers/konnors-ninja-keys/pull/9