diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-03-19 17:11:41 +0100 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2021-03-19 17:11:41 +0100 |
commit | b9f8d1fc5183e942b28a55709bfcd1b22d691e79 (patch) | |
tree | 8deb30cb78598fcc68d2448198521e0473b02ad6 | |
parent | 0fd8cc67f280143e815f1e2e449afa1f17c52a3b (diff) |
fix: error on escape quote text
-rw-r--r-- | src/commit/models.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commit/models.rs b/src/commit/models.rs index deb2030..987bcd2 100644 --- a/src/commit/models.rs +++ b/src/commit/models.rs @@ -111,12 +111,12 @@ impl Commit { "('{}', {}, E'{}', '{}', '{}', E'{}', '{}', E'{}', '{}'),", commit.hash, tree, - commit.text.replace("'", "\\'"), + commit.text.replace("\\'", "'").replace("'", "\\'"), commit.date, commit.author_email, - commit.author_name.replace("'", "\\'"), + commit.author_name.replace("\\'", "'").replace("'", "\\'"), commit.committer_email, - commit.committer_name.replace("'", "\\'"), + commit.committer_name.replace("\\'", "'").replace("'", "\\'"), commit.repository_url )[..] } |