Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmendsenProject
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shaik Janipasha
AmendsenProject
Commits
21a763ad
Unverified
Commit
21a763ad
authored
Jul 01, 2020
by
jonhehir
Committed by
GitHub
Jul 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
escape backslashes before quotes, otherwise you break everything (#298)
parent
1faa7133
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
neo4j_csv_publisher.py
databuilder/publisher/neo4j_csv_publisher.py
+2
-2
No files found.
databuilder/publisher/neo4j_csv_publisher.py
View file @
21a763ad
...
...
@@ -391,11 +391,11 @@ ON MATCH SET {update_prop_body}""".format(create_prop_body=create_prop_body,
template_params
[
k
]
=
v
continue
# escape quote for Cypher query
# if isinstance(str, v):
v
=
v
.
replace
(
'
\'
'
,
"
\\
'"
)
# escape backslash for Cypher query
v
=
v
.
replace
(
'
\\
'
,
'
\\\\
'
)
# escape quote for Cypher query
v
=
v
.
replace
(
'
\'
'
,
"
\\
'"
)
if
k
.
endswith
(
UNQUOTED_SUFFIX
):
k
=
k
[:
-
len
(
UNQUOTED_SUFFIX
)]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment