summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commit/models.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/commit/models.rs b/src/commit/models.rs
index 2f1536b..7f6a9fc 100644
--- a/src/commit/models.rs
+++ b/src/commit/models.rs
@@ -108,15 +108,15 @@ impl Commit {
None => "NULL".to_string(),
};
raw_query += &format!(
- "('{}', {}, '{}', '{}', '{}', '{}', '{}', '{}', '{}'),",
+ "('{}', {}, E'{}', '{}', '{}', E'{}', '{}', E'{}', '{}'),",
commit.hash,
tree,
- commit.text,
+ commit.text.replace("'", "\\'"),
commit.date,
commit.author_email,
- commit.author_name,
+ commit.author_name.replace("'", "\\'"),
commit.committer_email,
- commit.committer_name,
+ commit.committer_name.replace("'", "\\'"),
commit.repository_url
)[..]
}