Escaping question mark in manticore query to prevent conflict with manticore and knex syntax.
This commit is contained in:
2003
package-lock.json
generated
2003
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -57,8 +57,8 @@
|
||||
"template-format": "^1.2.5",
|
||||
"unprint": "^0.14.1",
|
||||
"video.js": "^8.10.0",
|
||||
"vike": "^0.4.150",
|
||||
"vite": "^4.5.1",
|
||||
"vike": "^0.4.220",
|
||||
"vite": "^6.1.0",
|
||||
"vue": "^3.3.10",
|
||||
"vue-virtual-scroller": "^2.0.0-beta.8",
|
||||
"winston": "^3.11.0",
|
||||
|
||||
2
static
2
static
Submodule static updated: 3d26382892...04c9d2175c
@@ -4,8 +4,10 @@ export default function escape(string) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return string
|
||||
const replaced = string
|
||||
.replace(/\\/g, String.raw`\\\\`) // using String.raw so we don't have to double up JS and SQL escaping
|
||||
.replace(/'/g, String.raw`\'`)
|
||||
.replace(/(["!$()/<@^|~-])/g, String.raw`\\$1`);
|
||||
.replace(/(["?!$()/<@^|~-])/g, String.raw`\\$1`);
|
||||
|
||||
return replaced;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user