Skip to content
Snippets Groups Projects
Commit 8602bd0b2f91 authored by Frank Bessou's avatar Frank Bessou :spider_web:
Browse files

feat: escape single quote characters

parent 10156e7b6375
No related branches found
No related tags found
1 merge request!17Topic/default/alireensemble
Pipeline #42420 passed
......@@ -57,9 +57,14 @@
// Handle filters
restrictions.push(
...Object.entries(filter).map(([attrName, attrValue]) => {
return `EXISTS(X ${attrName} ~= '%${attrValue}%')`;
})
...Object.entries(filter as Record<string, string>).map(
([attrName, attrValue]) => {
return `EXISTS(X ${attrName} ~= '%${attrValue.replace(
"'",
"\\'"
)}%')`;
}
)
);
const total = await rqlClient
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment