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

frontend: AutocompleteInput: escape * in fuzzyfinding (#1846) #1864

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexandre-janniaux
Copy link

When inserting a suggestion, the value can have invalid characters, and in particular * which can easily be present on the payee: field or narration field.

Fixes #1846

When inserting a suggestion, the value can have invalid characters, and
in particular `*` which can easily be present on the payee: field or
narration field.

Fixes beancount#1846
Copy link
Member

@yagebu yagebu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for the PR :)

Since this is not the only character that might cause issues when searching as a regular expression, would be good to solve that while we're at it. Could you create a function that covers all of them (and some tests)? (see e.g. this stackoverflow thread for possible solutions https://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript).

Edit: seems like we have that function already :) - escape in journal/index.ts

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 this pull request may close these issues.

Search completion issue when searching payee: field with unescaped * character
2 participants