From 3d73ef3c130d002ebb415dac0e0b3c0f6591af5d Mon Sep 17 00:00:00 2001 From: Himanshu Warekar Date: Wed, 28 Aug 2019 00:07:00 +0530 Subject: [PATCH] fix: use escape --- frappe/patches/v12_0/move_email_and_phone_to_child_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/patches/v12_0/move_email_and_phone_to_child_table.py b/frappe/patches/v12_0/move_email_and_phone_to_child_table.py index feb97e1ab5..7ad16e5378 100644 --- a/frappe/patches/v12_0/move_email_and_phone_to_child_table.py +++ b/frappe/patches/v12_0/move_email_and_phone_to_child_table.py @@ -8,7 +8,7 @@ def execute(): name_counter = 100000000 for contact_detail in contact_details: - contact_name = contact_detail.name.replace('"', '\\"').replace("'", "\\'") + contact_name = frappe.db.escape(contact_detail.name) if contact_detail.email_id: frappe.db.sql("""