From 175b974910faf36fffea1cc064f4964584adca62 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Fri, 15 Nov 2019 15:44:39 +0530 Subject: [PATCH] fix(pdf): Remove unnecessary argument https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote https://docs.python.org/2/library/urllib.html#urllib.quote --- frappe/utils/response.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/response.py b/frappe/utils/response.py index 886baf2c37..8169986e44 100644 --- a/frappe/utils/response.py +++ b/frappe/utils/response.py @@ -90,7 +90,7 @@ def as_json(): def as_pdf(): response = Response() response.mimetype = "application/pdf" - encoded_filename = quote(frappe.response['filename'].replace(' ', '_'), encoding='utf-8') + encoded_filename = quote(frappe.response['filename'].replace(' ', '_')) response.headers["Content-Disposition"] = ("filename=\"%s\"" % frappe.response['filename'].replace(' ', '_') + ";filename*=utf-8''%s" % encoded_filename).encode("utf-8") response.data = frappe.response['filecontent'] return response