Skip to content

Commit

Permalink
Escape if all non-letter characters are present
Browse files Browse the repository at this point in the history
  • Loading branch information
insmac committed Jun 21, 2024
1 parent d171bba commit b106e49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/queryBuilder/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ const getLimit = (limit?: string): string => {

const escapeFields = (fields: string[]): string[] => {
return fields.map((f) => {
return f.match(/(^\d|\s|\$|\&|\|)/im) ? `"${f}"` : f;
return f.match(/(^\d|[^a-zA-Z_])/im) ? `"${f}"` : f;
});
};

Expand Down

0 comments on commit b106e49

Please sign in to comment.