diff --git a/CHANGELOG.md b/CHANGELOG.md index a2403e1e8..c968a8c5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ * Propagate sort fields while applying filters too. Refs. STSMACOM-770. * Add `` to `` component. Refs STSMACOM-767. * *BREAKING* Upgrade `react` to `v18`. Refs STSMACOM-769. +* Use `escapeCqlValueAllowAsterisk` instead of `escapeCqlValue` to avoid escaping the asterisk. Refs STSMACOM-771. ## [8.0.0](https://github.com/folio-org/stripes-smart-components/tree/v8.0.0) (2023-01-30) [Full Changelog](https://github.com/folio-org/stripes-smart-components/compare/v7.3.0...v8.0.0) diff --git a/lib/SearchAndSort/makeQueryFunction.js b/lib/SearchAndSort/makeQueryFunction.js index 21e8ff558..e701f1eb4 100644 --- a/lib/SearchAndSort/makeQueryFunction.js +++ b/lib/SearchAndSort/makeQueryFunction.js @@ -1,6 +1,6 @@ import { compilePathTemplate } from '@folio/stripes-connect'; import { filters2cql } from '@folio/stripes-components'; -import { escapeCqlValue } from '@folio/stripes-util'; +import { escapeCqlValueAllowAsterisk } from '@folio/stripes-util'; import { get } from 'lodash'; import { removeNsKeys } from './nsQueryFunctions'; @@ -47,7 +47,7 @@ function makeQueryFunction(findAll, queryTemplate, sortMap, filterConfig, failOn return null; } - const escapeFx = config.escape ? escapeCqlValue : (s) => (s); + const escapeFx = config.escape ? escapeCqlValueAllowAsterisk : (s) => (s); let cql; if (query && qindex) {