Mask double quotes and backslash (searching by quote or backslash generates error)

Description

Select "Subject" for the search type (or any search type - they all seem to generate an error when quotes or backslash are included)
When entering
\"
or
"
into the search box there should be no error message (the backend will ignore these characters when the = operator for a full-text search is used, for an exact search using == correct masking is needed).

Actual result for the second search term: Error popup: ERROR: in module @folio/inventory, operation GET on resource 'records' failed, saying: org.z3950.zing.cql.cql2pgjson.QueryValidationException: org.z3950.zing.cql.CQLParseException: expected ')', got EOF

These are the query strings (after urldecoding) sent from front-end to back-end:

(subjects=""") sortby title (subjects="\"") sortby title

They should be

(subjects="\"") sortby title (subjects="\\\"") sortby title

For CQL quoted string masking see https://www.loc.gov/standards/sru/cql/spec.html#bnf

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

8
  • 05 Mar 2020, 01:41 PM
  • 05 Mar 2020, 01:41 PM
  • 05 Mar 2020, 01:41 PM
  • 05 Mar 2020, 01:41 PM
  • 05 Mar 2020, 01:41 PM
  • 05 Mar 2020, 01:41 PM
  • 05 Mar 2020, 01:41 PM
  • 05 Mar 2020, 01:41 PM

Checklist

hide

TestRail: Results

Activity

Show:

Charlotte Whitt March 5, 2020 at 1:43 PM
Edited

Manual test in FOLIO Snapshot, version @folio/inventory 1.13.1000809, using Chrome.

All looks perfect Yellow Star. Thanks . I'll close the ticket.

Cate Boerema June 11, 2019 at 3:46 PM

Assumption is that we will start with UIIN and may need to file more stories for other apps after

Julian Ladisch May 28, 2019 at 8:32 AM

Example for a cqlQuote function:

function cqlQuote(str) { return '"' + str.replace(/"|\\/g, c => '\\' + c) + '"'; }
Done

Details

Assignee

Reporter

Tester Assignee

Priority

Story Points

Sprint

Development Team

Prokopovych

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created May 27, 2019 at 2:30 PM
Updated March 17, 2023 at 7:16 AM
Resolved March 5, 2020 at 1:46 PM
TestRail: Cases
TestRail: Runs

Flag notifications