From 015fa7a1d1b60eae863fbe02451c8c523c6c5745 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 8 Jan 2015 18:26:53 +0530 Subject: [PATCH] [fix] escape quote in Accounts Receivable --- .../accounts/report/accounts_receivable/accounts_receivable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index a2ed86da15..a546799a5d 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -149,7 +149,7 @@ class AccountsReceivableReport(object): if not account_map: frappe.throw(_("No Customer Accounts found.")) else: - accounts_list = ['"{0}"'.format(ac.replace('"', '\"')) for ac in account_map] + accounts_list = ["'{0}'".format(frappe.db.escape(ac)) for ac in account_map] conditions.append("account in ({0})".format(", ".join(accounts_list))) return " and ".join(conditions), values