Skip to content

Commit c0510e6

Browse files
authored
Escape double quotes (#107)
* use double quotes while escpaing database object names * 2.5.28
1 parent 82afae9 commit c0510e6

File tree

6 files changed

+829
-67
lines changed

6 files changed

+829
-67
lines changed

.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@
1515
],
1616
"extends": [
1717
"eslint:recommended",
18-
"eslint-node:recommended"
18+
"plugin:node/recommended"
1919
],
20+
"parserOptions": {
21+
"ecmaVersion": 2020
22+
},
2023
"rules": {
2124
"no-console": "warn",
2225
"no-invalid-this": "warn",
2326
"no-undef": "error",
2427
"no-unused-vars": "warn",
28+
"no-var": "off",
2529
"strict": [
2630
2,
2731
"never"

object-name.validator.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ class ObjectNameValidator {
8787

8888

8989
ObjectNameValidator.Patterns = {
90-
Default: '([a-zA-Z0-9_]+)',
91-
Latin: '([\u0030-\u0039\u0041-\u005A\u0061-\u007A\u005F]+)',
92-
LatinExtended: '([\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00A0-\u024F\u005F]+)',
93-
Greek: '([\u0030-\u0039\u0041-\u005A\u0061-\u007A\u0386-\u03CE\u005F]+)',
94-
Cyrillic: '([\u0030-\u0039\u0041-\u007A\u0061-\u007A\u0400-\u04FF\u005F]+)',
95-
Hebrew: '([\u0030-\u0039\u0041-\u005A\u0061-\u007A\u05D0-\u05F2\u005F]+)'
90+
Default: '(([a-zA-Z0-9_]+)|("[\\sa-zA-Z0-9_]+"))',
91+
Latin: '(([\u0030-\u0039\u0041-\u005A\u0061-\u007A\u005F]+)|("[\\s\u0030-\u0039\u0041-\u005A\u0061-\u007A\u005F]+"))',
92+
LatinExtended: '(([\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00A0-\u024F\u005F]+)|("[\\s\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00A0-\u024F\u005F]+"))',
93+
Greek: '(([\u0030-\u0039\u0041-\u005A\u0061-\u007A\u0386-\u03CE\u005F]+)|("[\\s\u0030-\u0039\u0041-\u005A\u0061-\u007A\u0386-\u03CE\u005F]+"))',
94+
Cyrillic: '(([\u0030-\u0039\u0041-\u007A\u0061-\u007A\u0400-\u04FF\u005F]+)|("[\\s\u0030-\u0039\u0041-\u007A\u0061-\u007A\u0400-\u04FF\u005F]+"))',
95+
Hebrew: '(([\u0030-\u0039\u0041-\u005A\u0061-\u007A\u05D0-\u05F2\u005F]+)|("[\\s\u0030-\u0039\u0041-\u005A\u0061-\u007A\u05D0-\u05F2\u005F]+"))'
9696
}
9797
// use default object name validator
9898
ObjectNameValidator.use(new ObjectNameValidator());

0 commit comments

Comments
 (0)