Skip to content

Commit

Permalink
Merge pull request #3 from SanderTuit/fix-backslash-escape
Browse files Browse the repository at this point in the history
fix: unescape match and search values from database
  • Loading branch information
Totto16 authored May 29, 2024
2 parents ca79936 + 6b131f3 commit 3b95156
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,9 @@ class Database {
const copyDate = iter.get_value_for_field('copyDate') as any as string;
const isFavorite = iter.get_value_for_field('isFavorite') as any as string;
const matchValue = iter.get_value_for_field('matchValue') as any as string;
const matchValue_unescaped = Gda5.default_unescape_string(matchValue) ?? matchValue;
const searchValue = iter.get_value_for_field('searchValue') as any as string;
const searchValue_unescaped = Gda5.default_unescape_string(searchValue) ?? searchValue;
const metaData = iter.get_value_for_field('metaData') as any as string;

itemList.push({
Expand All @@ -334,8 +336,8 @@ class Database {
content: content_unescaped,
copyDate: new Date(copyDate),
isFavorite: !!isFavorite,
matchValue,
searchValue,
matchValue: matchValue_unescaped,
searchValue: searchValue_unescaped,
metaData,
});
}
Expand Down

0 comments on commit 3b95156

Please sign in to comment.