Skip to content

Commit

Permalink
frontend: AutocompleteInput: escape * in fuzzyfinding
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alexandre-janniaux committed Sep 20, 2024
1 parent 42b70b7 commit a6870ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/AutocompleteInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
input != null && valueSelector != null
? valueSelector(suggestion, input)
: suggestion;
value = value.replace("*", "\\*");
dispatch("select", input);
hidden = true;
}
Expand Down

0 comments on commit a6870ad

Please sign in to comment.