Merge pull request #1325 from abdnh/fix-dupe-quote-escaping

Fix double quotes being escaped twice in dupe search
This commit is contained in:
Damien Elmes 2021-08-09 16:16:12 +10:00 committed by GitHub
commit 9a0f095e55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,7 +148,7 @@ fn write_rated(days: &u32, ease: &RatingKind) -> String {
/// Escape double quotes and backslashes: \"
fn write_dupe(notetype_id: &NotetypeId, text: &str) -> String {
let esc = text.replace(r"\", r"\\").replace('"', r#"\""#);
let esc = text.replace(r"\", r"\\");
maybe_quote(&format!("dupe:{},{}", notetype_id, esc))
}