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("""